MaximalIndependentFamily
Finite maximal independent families and polynomial relations, without Choice
1-- Finite maximal independent families and polynomial relations, without Choice.2-- Part of the Grace17 examples.3-- Copyright (c) 2026 Grant Passmore.4-- Released under the Apache License 2.0. See LICENSE in the repository root.5-- Authors: Grant Passmore67module MaximalIndependentFamily8import Grace.Cumulus.Algebra.Polynomial.IndependentSubfamily910theorem finite_subsets (I : Set)11 requires finite : Finite(I)12 shows Finite(π«(I))13proof14 exact Finite.powerset with *1516theorem maximal_member (F J : Set)17 requires finite : Finite(F)18 requires seed : J β F19 shows β M β F, J β M β§ (β T β F, M β T β T = M)20proof21 exact Finite.maximal_extension with *2223section Rings24variable (I A add z neg mul one B plus o minus times unit f v : Set)25notation ring R := (A, add, z, neg, mul, one)26notation ring S := (B, plus, o, minus, times, unit)27hypothesis source : IsCommRing(R)28hypothesis target : IsCommRing(S)29hypothesis hom : IsRingHom(f, R, S)3031theorem empty_family32 requires injective : InjectiveBetween(f, R, S)33 requires emptyAssignment : v : β
β S34 shows AlgebraicallyIndependent(β
, R, S, f, v)35proof36 exact AlgebraicallyIndependent.empty with *3738theorem maximal_independent_family39 requires finite : Finite(I)40 requires injective : InjectiveBetween(f, R, S)41 requires assignment : v : I β S42 shows β M, M β I β§ AlgebraicallyIndependent(M, R, S, f, restrict(v, M)) β§43 (β T, T β I β M β T β AlgebraicallyIndependent(T, R, S, f, restrict(v, T)) β T = M)44proof45 exact AlgebraicallyIndependent.exists_maximal with *4647theorem extend_independent_family (J : Set)48 requires finite : Finite(I)49 requires subset : J β I50 requires independent : AlgebraicallyIndependent(J, R, S, f, restrict(v, J))51 shows β M, M β I β§ J β M β§ AlgebraicallyIndependent(M, R, S, f, restrict(v, M)) β§52 (β T, T β I β M β T β AlgebraicallyIndependent(T, R, S, f, restrict(v, T)) β T = M)53proof54 exact AlgebraicallyIndependent.maximal_extension with *5556section Adjoin57variable (M j : Set)58notation ring Q := R[insert(j, M)]5960theorem excluded_generator_has_relation61 requires assignment : v : I β S62 requires subset : M β I63 requires maximal : β T, T β I β M β T β AlgebraicallyIndependent(T, R, S, f, restrict(v, T)) β T = M64 requires index : j β I65 requires outside : Β¬(j β M)66 shows β p β Q, p β Q[0] β§67 polynomialAtOver(insert(j, M), R, S, f, restrict(v, insert(j, M)))(p) = S[0]68proof69 exact AlgebraicallyIndependent.maximal_adjoin_relation with *7071end Adjoin72end Rings73