Skip to content

Commit d19bdec

Browse files
committed
Added more ring, group and permutation material
This includes three blocks of miscellaneous algebraic infrastructure, almost all of which was written by Claude Opus 4.6: 1. Solvable groups and the symmetric group Defined solvable_group in Library/grouptheory.ml with basic closure properties (subgroups, quotients, extensions, epimorphic images). Added supporting material on permutations in Library/permutations.ml: swap theory, restricted permutations, three-cycles and the key lemma THREE_CYCLE_AS_COMMUTATOR showing every 3-cycle is a commutator of two 3-cycles. Combined these in the new file Library/symmetric_group.ml, which defines the symmetric group and proves NOT_SOLVABLE_SYMMETRIC_GROUP (S_n is not solvable for n >= 5), following Stillwell's "Galois Theory for Beginners". Also includes Cayley's theorem, the generation of symmetric groups by transpositions, and characterization of prime-order permutations. Added CARD_LE_2, CARD_LE_3, CARD_LE_4 to sets.ml in support. New definitions: solvable_group symmetric_group three_cycle and theorems: ABELIAN_IMP_SOLVABLE_GROUP ABELIAN_QUOTIENT_COMMUTATOR ABELIAN_QUOTIENT_EPIMORPHIC_IMAGE ALL_TRANSPOSITIONS_GENERATE_SYMMETRIC CARD_LE_2 CARD_LE_3 CARD_LE_4 CARD_SYMMETRIC_GROUP CAYLEY_THEOREM CAYLEY_THEOREM_EXPLICIT CHAIN_STEP_THREE_CYCLES_GEN COMMUTATOR_IMP_ABELIAN_QUOTIENT FINITE_SYMMETRIC_GROUP INVERSE_UNIQUE_ALT INVOLUTION_MOVES_2_IS_SWAP INVOLUTION_SIZE_2_IS_SWAP ISOMORPHIC_GROUP_SOLVABILITY NOT_SOLVABLE_SYMMETRIC_GROUP PERMUTES_THREE_CYCLE POINT_TRANSPOSITIONS_GENERATE_ALL PRIME_ORDER_PERM_NO_FIXPOINT PRIME_ORDER_PERM_ORBIT PRIME_ORDER_POW_PERM RESTRICT_COMPOSE RESTRICT_I RESTRICT_INVERSE RESTRICT_PERMUTES_SUBSET RESTRICT_SWAP RESTRICT_SYMMETRIC_GROUP_HOMOMORPHISM SOLVABLE_GROUP_ALT SOLVABLE_GROUP_EPIMORPHIC_IMAGE SOLVABLE_GROUP_NORMAL_EXTENSION SOLVABLE_GROUP_QUOTIENT SOLVABLE_GROUP_SOLVABLE_QUOTIENT SOLVABLE_GROUP_SUBGROUP SUBGROUP_RESTRICT_PERMUTES SWAP_CONJUGATE SWAP_CONJUGATE_IN_SUBGROUP SWAP_IN_SYMMETRIC_GROUP SWAP_LEFT SWAP_OTHER SWAP_RIGHT SWAP_TRIPLE SWAP_TRIPLE_ALT SYMMETRIC_GROUP SYMMETRIC_GROUP_ACTION SYMMETRIC_GROUP_ID SYMMETRIC_GROUP_INV SYMMETRIC_GROUP_MUL SYMMETRIC_GROUP_POW SYMMETRIC_GROUP_POW_IN THREE_CYCLE_AS_COMMUTATOR THREE_CYCLE_COMMUTATOR THREE_CYCLE_COMPOSE_REVERSE THREE_CYCLE_IN_SYMMETRIC THREE_CYCLE_INVERSE THREE_CYCLE_NOT_I TRANSITIVE_TRANSPOSITION_GENERATES_SYMMETRIC TRANSPOSITION_PCYCLE_GENERATES TRIVIAL_IMP_SOLVABLE_GROUP 2. UFD localization, Gauss's lemma, Eisenstein criterion In Library/ringtheory.ml, proved that localization preserves the integral domain and UFD properties (INTEGRAL_DOMAIN_LOCALIZATION, UFD_LOCALIZATION), Independently, established UFD_POLY_RING: polynomial rings over a UFD are UFDs, via the univariate case and Gauss's lemma (POLY_PRIMITIVE_CONST_CANCEL). Added the Eisenstein irreducibility criterion in three forms: EISENSTEIN_IRREDUCIBILITY_GEN (over integral domains), EISENSTEIN_IRREDUCIBILITY (primitive polynomials over UFDs), and EISENSTEIN_IRREDUCIBILITY_FRACTION_RING (over the fraction field, the classical form). New theorems: EISENSTEIN_IRREDUCIBILITY EISENSTEIN_IRREDUCIBILITY_FRACTION_RING EISENSTEIN_IRREDUCIBILITY_GEN INTEGRAL_DOMAIN_LOCALIZATION IRREDUCIBLE_PRIMITIVE_POLY_FRACTION_RING LOCALEQUIV_MUL_CANCEL MAKE_PRIMITIVE_IN_IDEAL MONOMIAL_MUL_VAR_ONE POLY_CLEAR_DENOMINATORS POLY_CONST_DIVIDES_COEFFS POLY_CONST_DIVIDES_COEFFS_EQ POLY_CONST_DIVIDES_COEFFS_REV POLY_MAKE_PRIMITIVE POLY_MONOMIALS_ALT POLY_MUL_VAR_COEFF_UNIVARIATE POLY_PRIMITIVE_CONST_CANCEL POLY_RING_HOMOMORPHISM_I POLY_VAR_DIVIDES_UNIVARIATE POLY_VAR_MONOMIAL_1 RING_DIVIDES_LOCALEQUIV RING_PRIME_POLY_CONST RING_PRIME_POLY_RING_MONO RING_PRIME_POLY_VAR_UNIVARIATE UFD_LOCALIZATION UFD_POLY_RING 3. Univariate polynomial coefficient accessor Adopted the "coeff" function from 100/transcendence.ml into the main ring theory file, with the definition `coeff = \i p. p(\v:1. i)`. Added 28 new theorems about coefficient extraction for basic ring operations including the Cauchy product formula, degree bounds, polynomial characterization, and evaluation. New definition: coeff and theorems: COEFF COEFF_IN_CARRIER COEFF_IN_CARRIER_ALT COEFF_NONZERO_LE COEFF_NONZERO_LE_DEG COEFF_POLY_0 COEFF_POLY_1 COEFF_POLY_ADD COEFF_POLY_CONST COEFF_POLY_CONST_MUL COEFF_POLY_MUL COEFF_POLY_MUL_CONST COEFF_POLY_NEG COEFF_POLY_SUB COEFF_POLY_SUM FINITE_COEFF_SUPPORT FUN_EQ_COEFF POLY_DEG_EQ_COEFF POLY_DEG_EQ_COEFF_FROM_LE POLY_DEG_LE_COEFF POLY_EVAL_COEFF POLY_MUL_UNIVARIATE POLY_TOP_EQ_0 RING_POLYNOMIAL_COEFF RING_POLYNOMIAL_COEFF_BOUND RING_POLYNOMIAL_COEFF_ZERO_FROM RING_POLYNOMIAL_SUBRING_COEFF RING_POWERSERIES_COEFF Restated 7 existing theorems to use coeff in their statements: POLY_DIVISION_GEN POLY_EVAL_AT_0 POLY_EVAL_EXPAND POLY_EXPAND POLY_EXTEND_UNIVARIATE POLY_TOP_NONZERO POLY_TOP_TAIL Adjusted three proofs in Library/fieldtheory.ml for the restated POLY_EXTEND_UNIVARIATE. In 100/transcendence.ml, replaced the local coeff definition with a bridge lemma "coeff_x_monomial" and simplified about 20 proofs to one-line derivations from the new ringtheory theorems.
1 parent 3bc3d27 commit d19bdec

9 files changed

Lines changed: 5713 additions & 185 deletions

File tree

100/transcendence.ml

Lines changed: 37 additions & 155 deletions
Large diffs are not rendered by default.

CHANGES

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,105 @@
88
* page: https://github.com/jrh13/hol-light/commits/master *
99
* *****************************************************************
1010

11+
Thu 23rd Apr 2026 Library/ringtheory.ml, Library/fieldtheory.ml, 100/transcendence.ml
12+
13+
Adopted the "coeff" function from 100/transcendence.ml in the main ring theory
14+
file, with an equivalent but more direct definition. Added 28 new theorems
15+
about coefficient extraction for basic operations, the Cauchy product, degree
16+
interaction, polynomial characterization, and evaluation:
17+
18+
COEFF
19+
COEFF_IN_CARRIER
20+
COEFF_IN_CARRIER_ALT
21+
COEFF_NONZERO_LE
22+
COEFF_NONZERO_LE_DEG
23+
COEFF_POLY_0
24+
COEFF_POLY_1
25+
COEFF_POLY_ADD
26+
COEFF_POLY_CONST
27+
COEFF_POLY_CONST_MUL
28+
COEFF_POLY_MUL
29+
COEFF_POLY_MUL_CONST
30+
COEFF_POLY_NEG
31+
COEFF_POLY_SUB
32+
COEFF_POLY_SUM
33+
FINITE_COEFF_SUPPORT
34+
FUN_EQ_COEFF
35+
POLY_DEG_EQ_COEFF
36+
POLY_DEG_EQ_COEFF_FROM_LE
37+
POLY_DEG_LE_COEFF
38+
POLY_EVAL_COEFF
39+
POLY_MUL_UNIVARIATE
40+
POLY_TOP_EQ_0
41+
RING_POLYNOMIAL_COEFF
42+
RING_POLYNOMIAL_COEFF_BOUND
43+
RING_POLYNOMIAL_COEFF_ZERO_FROM
44+
RING_POLYNOMIAL_SUBRING_COEFF
45+
RING_POWERSERIES_COEFF
46+
47+
Also added helper lemmas LAMBDA_1_EQ, FINITE_FUN_FROM_1, MONOMIAL_DEG_ONE
48+
and moved EXISTS_FUN_FROM_1, FORALL_FUN_FROM_1 earlier in the file. Seven
49+
existing theorems are restated to use coeff in their statements:
50+
51+
POLY_DIVISION_GEN
52+
POLY_EVAL_AT_0
53+
POLY_EVAL_EXPAND
54+
POLY_EXPAND
55+
POLY_EXTEND_UNIVARIATE
56+
POLY_TOP_NONZERO
57+
POLY_TOP_TAIL
58+
59+
Three proofs in Library/fieldtheory.ml are adjusted for the restated
60+
POLY_EXTEND_UNIVARIATE, and in 100/transcendence.ml the local coeff
61+
definition is replaced by a bridge lemma "coeff_x_monomial" connecting the
62+
ringtheory definition with the local x_monomial construct, and about 20
63+
proofs are simplified to one-line derivations from the new ringtheory
64+
theorems.
65+
66+
Mon 20th Apr 2026 passim
67+
68+
Fixed another case identified by Daniel Nezamabadi where polymorphic
69+
comparison was mistakenly being used on the bignum type, this one in
70+
Multivariate/vectors.ml; then assisted by Claude found and fixed many
71+
other instances of the same issue
72+
73+
- iterate.ml: EXPAND_NSUM_CONV, EXPAND_SUM_CONV
74+
- printer.ml: DECIMAL printer
75+
- calc_rat.ml: RAW_REAL_RAT_MUL_CONV
76+
- calc_int.ml: is_realintconst, term_of_rat
77+
- int.ml: is_intconst
78+
- Library/calc_real.ml: REAL_FLOAT_MUL_CONV helper
79+
- Library/bitmatch.ml: bitpat_matches, inst_bitpat_numeral, unword
80+
- Library/isum.ml: EXPAND_ISUM_CONV
81+
82+
Tue 14th Apr 2026 Library/tactician_light.ml [new file]
83+
84+
Added "Tactician Light", a proof format translator for HOL Light, converting
85+
between interactive (g/e) and structured (prove) proof styles. It is inspired
86+
by Mark Adams' Tactician tool for HOL Light:
87+
88+
http://www.proof-technologies.com/tactician/
89+
90+
which provided similar functionality via a "hiproof" representation and
91+
refactoring pipeline. This is a from-scratch reimplementation by Claude Code
92+
using string-based tactic recording rather than the original promotion/demotion
93+
mechanism. Although this simpler version requires some additional user work
94+
(e.g. saving a log of the tactic invocations to a file for processing by
95+
"i2s"), it is considerably simpler and less sensitive to OCaml internals.
96+
97+
Mon 13th Apr 2026 mcp/*
98+
99+
Merged an update from Ceren Kocaogullar adding proof recording tools
100+
"start_recording" and "stop_recording" to the MCP setup. This helps when
101+
the LLM is developing large proofs interactively in cases where the
102+
context window is exhausted or the session crashes. By retaining this
103+
record, the proof can resume where it left off.
104+
105+
Sun 12th Apr 2026 mcp/SKILL.md
106+
107+
Merged an update from Nevine Ebeid to the mcp/SKILL.md file that refines or
108+
corrects the explanations of several constructs and adds new pitfall warnings.
109+
11110
Wed 8th Apr 2026 100/green.ml [new file], 100/isoperimetric.ml, Library/words.ml, Multivariate/measure.ml, Multivariate/transcendentals.ml, Multivariate/realanalysis.ml, Multivariate/cauchy.ml
12111

13112
Added a proof of Green's theorem in a fairly general form, autoformalized by
@@ -200,6 +299,117 @@ Numbers (weak and strong), Fair Games Theorem (Doob optional stopping),
200299
Borel-Cantelli lemmas, martingale convergence and the Azuma-Hoeffding
201300
inequality.
202301

302+
Mon 9th Mar 2026 Library/ringtheory.ml
303+
304+
Added more elementary results in ring theory: the preservation of the UFD
305+
property in localization and in polynomial rings (the latter via Gauss's lemma,
306+
some forms of which are broken out, e.g. as POLY_PRIMITIVE_CONST_CANCEL), and
307+
the Eisenstein irreducibility criterion:
308+
309+
EISENSTEIN_IRREDUCIBILITY
310+
EISENSTEIN_IRREDUCIBILITY_FRACTION_RING
311+
EISENSTEIN_IRREDUCIBILITY_GEN
312+
INTEGRAL_DOMAIN_LOCALIZATION
313+
IRREDUCIBLE_PRIMITIVE_POLY_FRACTION_RING
314+
LOCALEQUIV_MUL_CANCEL
315+
MAKE_PRIMITIVE_IN_IDEAL
316+
MONOMIAL_MUL_VAR_ONE
317+
POLY_CLEAR_DENOMINATORS
318+
POLY_CONST_DIVIDES_COEFFS
319+
POLY_CONST_DIVIDES_COEFFS_EQ
320+
POLY_CONST_DIVIDES_COEFFS_REV
321+
POLY_MAKE_PRIMITIVE
322+
POLY_MONOMIALS_ALT
323+
POLY_MUL_VAR_COEFF_UNIVARIATE
324+
POLY_PRIMITIVE_CONST_CANCEL
325+
POLY_RING_HOMOMORPHISM_I
326+
POLY_VAR_DIVIDES_UNIVARIATE
327+
POLY_VAR_MONOMIAL_1
328+
RING_DIVIDES_LOCALEQUIV
329+
RING_PRIME_POLY_CONST
330+
RING_PRIME_POLY_RING_MONO
331+
RING_PRIME_POLY_VAR_UNIVARIATE
332+
UFD_LOCALIZATION
333+
UFD_POLY_RING
334+
335+
Fri 6th Mar 2026 sets.ml, Library/grouptheory.ml, Library/permutations.ml, Library/symmetric_group.ml [new file]
336+
337+
Added a definition of "solvable_group" to the group theory library with some
338+
of its basic properties, as well as additional material about permutations.
339+
Combining these, the new file Library/symmetric_group.ml gives a basic
340+
development of the symmetric group (the group of permutations on set) including
341+
its unsolvability for a set of size >= 5. New definitions:
342+
343+
solvable_group
344+
symmetric_group
345+
three_cycle
346+
347+
and theorems:
348+
349+
ABELIAN_IMP_SOLVABLE_GROUP
350+
ABELIAN_QUOTIENT_COMMUTATOR
351+
ABELIAN_QUOTIENT_EPIMORPHIC_IMAGE
352+
ALL_TRANSPOSITIONS_GENERATE_SYMMETRIC
353+
CARD_SYMMETRIC_GROUP
354+
CAYLEY_THEOREM
355+
CAYLEY_THEOREM_EXPLICIT
356+
CHAIN_STEP_THREE_CYCLES_GEN
357+
COMMUTATOR_IMP_ABELIAN_QUOTIENT
358+
FINITE_SYMMETRIC_GROUP
359+
INVERSE_UNIQUE_ALT
360+
INVOLUTION_MOVES_2_IS_SWAP
361+
INVOLUTION_SIZE_2_IS_SWAP
362+
ISOMORPHIC_GROUP_SOLVABILITY
363+
NOT_SOLVABLE_SYMMETRIC_GROUP
364+
PERMUTES_THREE_CYCLE
365+
POINT_TRANSPOSITIONS_GENERATE_ALL
366+
PRIME_ORDER_PERM_NO_FIXPOINT
367+
PRIME_ORDER_PERM_ORBIT
368+
PRIME_ORDER_POW_PERM
369+
RESTRICT_COMPOSE
370+
RESTRICT_I
371+
RESTRICT_INVERSE
372+
RESTRICT_PERMUTES_SUBSET
373+
RESTRICT_SWAP
374+
RESTRICT_SYMMETRIC_GROUP_HOMOMORPHISM
375+
SOLVABLE_GROUP_ALT
376+
SOLVABLE_GROUP_EPIMORPHIC_IMAGE
377+
SOLVABLE_GROUP_NORMAL_EXTENSION
378+
SOLVABLE_GROUP_QUOTIENT
379+
SOLVABLE_GROUP_SOLVABLE_QUOTIENT
380+
SOLVABLE_GROUP_SUBGROUP
381+
SUBGROUP_RESTRICT_PERMUTES
382+
SWAP_CONJUGATE
383+
SWAP_CONJUGATE_IN_SUBGROUP
384+
SWAP_IN_SYMMETRIC_GROUP
385+
SWAP_LEFT
386+
SWAP_OTHER
387+
SWAP_RIGHT
388+
SWAP_TRIPLE
389+
SWAP_TRIPLE_ALT
390+
SYMMETRIC_GROUP
391+
SYMMETRIC_GROUP_ACTION
392+
SYMMETRIC_GROUP_ID
393+
SYMMETRIC_GROUP_INV
394+
SYMMETRIC_GROUP_MUL
395+
SYMMETRIC_GROUP_POW
396+
SYMMETRIC_GROUP_POW_IN
397+
THREE_CYCLE_AS_COMMUTATOR
398+
THREE_CYCLE_COMMUTATOR
399+
THREE_CYCLE_COMPOSE_REVERSE
400+
THREE_CYCLE_INVERSE
401+
THREE_CYCLE_IN_SYMMETRIC
402+
THREE_CYCLE_NOT_I
403+
TRANSITIVE_TRANSPOSITION_GENERATES_SYMMETRIC
404+
TRANSPOSITION_PCYCLE_GENERATES
405+
TRIVIAL_IMP_SOLVABLE_GROUP
406+
407+
Also added a few simple but natural lemmas to the sets.ml file in support:
408+
409+
CARD_LE_2 = |- CARD {a,b} <= 2
410+
CARD_LE_3 = |- CARD {a,b,c} <= 3
411+
CARD_LE_4 = |- CARD {a,b,c,d} <= 4
412+
203413
Thu 5th Mar 2026 Help/mapi.hlp
204414

205415
Added a documentation file for the new "mapi" function introduced as

Library/fieldtheory.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2900,7 +2900,7 @@ let FINITE_IMP_ALGEBRAIC_EXTENSION_EXPLICIT = prove
29002900
ASM_MESON_TAC[IN_NUMSEG; LE_0];
29012901
DISCH_TAC] THEN
29022902
ASM_SIMP_TAC[POLY_EXTEND_UNIVARIATE] THEN EXPAND_TAC "p" THEN
2903-
REWRITE_TAC[] THEN ASM_REWRITE_TAC[] THEN
2903+
REWRITE_TAC[coeff] THEN ASM_REWRITE_TAC[] THEN
29042904
RULE_ASSUM_TAC(REWRITE_RULE[ring_homomorphism; SUBSET; FORALL_IN_IMAGE]) THEN
29052905
ASM_SIMP_TAC[COND_RAND; COND_RATOR; RING_MUL_LZERO; RING_POW] THEN
29062906
REWRITE_TAC[GSYM RING_SUM_RESTRICT_SET] THEN
@@ -2950,6 +2950,7 @@ let RING_SIMPLE_EXTENSION_SPAN = prove
29502950
ASM_REWRITE_TAC[INSERT_SUBSET]] THEN
29512951
REWRITE_TAC[SUBSET; FORALL_IN_IMAGE] THEN X_GEN_TAC `p:(1->num)->A` THEN
29522952
STRIP_TAC THEN ASM_SIMP_TAC[POLY_EXTEND_UNIVARIATE] THEN
2953+
REWRITE_TAC[coeff] THEN
29532954
MATCH_MP_TAC RING_SPAN_SUM THEN REPEAT STRIP_TAC THEN REWRITE_TAC[] THEN
29542955
MATCH_MP_TAC RING_SPAN_MUL THEN ASM_REWRITE_TAC[] THEN
29552956
FIRST_ASSUM(ASSUME_TAC o MATCH_MP POLY_MONOMIAL_IN_CARRIER) THEN
@@ -2981,6 +2982,7 @@ let RING_SIMPLE_ALGEBRAIC_EXTENSION_SPAN = prove
29812982
ASM_SIMP_TAC[POLY_EXTEND_ADD; POLY_EXTEND_MUL; RING_POLYNOMIAL_MUL] THEN
29822983
ASM_SIMP_TAC[POLY_EXTEND; RING_MUL_RZERO; RING_ADD_LZERO] THEN
29832984
ASM_SIMP_TAC[POLY_EXTEND_UNIVARIATE; GSYM RING_POLYNOMIAL] THEN
2985+
REWRITE_TAC[coeff] THEN
29842986
MATCH_MP_TAC RING_SPAN_SUM THEN REWRITE_TAC[IN_NUMSEG] THEN
29852987
REPEAT STRIP_TAC THEN
29862988
RULE_ASSUM_TAC(REWRITE_RULE[ring_homomorphism; SUBSET; FORALL_IN_IMAGE]) THEN

0 commit comments

Comments
 (0)