Functions with finite support are those functions valued in a monoid that are equal to the neutral element everywhere except a finite number of points. They form a submonoid of the space of all functions valued in the monoid with the natural pointwise operation (or a subgroup if functions are valued in a group). Polynomials can be viewed as ring valued sequences that have finite support.
In this section we provide the definition and set up notation for formalizing the notion of finitely supported functions.
Support of a function is the subset of its domain where the values are not zero.
definition
\( \text{Supp}(f,G,A) \equiv \{x \in domain(f).\ f(x) \neq \text{ TheNeutralElement}(G,A)\} \)
A finitely supported function is such that its support is in the finite powerset of its domain.
definition
\( \text{FinSupp}(X,G,A) \equiv \{f \in X\rightarrow G.\ \text{Supp}(f,G,A) \in \text{FinPow}(X)\} \)
We will use the additive notation writing about finitely supported functions. In the finsupp context defined below we assume that \((M,A)\) is a monoid and \(X\) is some arbitrary set. We denote \( \mathcal{A} \) to be the pointwise operation on \(M\)-valued functions on \(X\) corresponding to the monoid operation \(A\), (denoted as \( + \)). \( 0 \) is the neutral element of the monoid.
locale finsupp
assumes monoidAsssum: \( \text{IsAmonoid}(M,A) \)
defines \( a + b \equiv A\langle a,b\rangle \)
defines \( \mathcal{M} \equiv \text{FinSupp}(X,M,A) \)
defines \( \mathcal{A} \equiv A \text{ lifted to function space over } X \)
defines \( a \oplus b \equiv \mathcal{A} \langle a,b\rangle \)
defines \( 0 \equiv \text{ TheNeutralElement}(M,A) \)
defines \( supp(f) \equiv \text{Supp}(f,M,A) \)
We can use theorems proven in the monoid0 context.
lemma (in finsupp) monoid0_valid:
shows \( monoid0(M,A) \) using monoidAsssum, monoid0_defWe show in Group_ZF_2 that if \((M,A)\) is a monoid, and \(X\) is an arbitrary set, then the space of functions \(X\rightarrow M\) with the natural pointwise operation is also a monoid. In this section we show that the set of finitely supported funtions is a a sub-monoid of that monoid.
The sum of monoid valued functions is a monoid valued function.
lemma (in finsupp) lifted_op_closed:
assumes \( f:X \rightarrow M \), \( g:X \rightarrow M \)
shows \( f\oplus g : X\rightarrow M \)proofWhat is the value of a sum of monoid-valued functions?
lemma (in finsupp) finsupp_sum_val:
assumes \( f:X \rightarrow M \), \( g:X \rightarrow M \) and \( x \in X \)
shows \( (f\oplus g)(x) = f(x) + g(x) \) using assms, monoid0_valid, lifted_valThe support of the sum of functions is contained in the union of supports.
lemma (in finsupp) supp_sum_union:
assumes \( f:X \rightarrow M \), \( g:X \rightarrow M \)
shows \( supp(f\oplus g) \subseteq supp(f) \cup supp(g) \)proofThe sum of finitely supported functions is finitely supported.
lemma (in finsupp) sum_finsupp:
assumes \( f \in \mathcal{M} \), \( g \in \mathcal{M} \)
shows \( f\oplus g \in \mathcal{M} \)proofThe neutral element of the lifted (pointwise) operation is the function equal zero everywhere. In the next lemma we show that this is a finitely supported function.
lemma (in finsupp) const_zero_fin_supp:
shows \( \text{ TheNeutralElement}(X\rightarrow M, \mathcal{A} ) \in \mathcal{M} \) using monoidAsssum, Group_ZF_2_1_L2, monoid0_valid, unit_is_neutral, func1_3_L1, func1_3_L2, func1_1_L1, Supp_def, empty_in_finpow, FinSupp_defFinitely supported functions form a submonoid of all functions with pointwise operation.
theorem (in finsupp) fin_supp_monoid:
shows \( \text{IsAmonoid}(\mathcal{M} ,\text{restrict}(\mathcal{A} ,\mathcal{M} \times \mathcal{M} )) \)proofSimilarly as in the monoid case the group valued finitely supported functions form a subgroup of all functions valued in that group.
We will reuse the notation defined in the finsupp context, just adding an assumption about that the existence of the right inverse with a notation for it.
locale finsupp1 = finsupp +
assumes rinverse: \( \forall x\in M.\ \exists y\in M.\ x + y = 0 \)
defines \( ( - a) \equiv \text{GroupInv}(M,A)(a) \)
With this additional assumption \((M,A)\) becomes a group and we can use theorems proven in ine group0 context.
lemma (in finsupp1) group0_valid:
shows \( \text{IsAgroup}(M,A) \) and \( group0(M,A) \) using monoidAsssum, rinverse, IsAgroup_def, group0_defRecall from Group_ZF_2 that the function space of \(G\) valued functions is also a group.
lemma (in finsupp1) fungroup0_valid:
shows \( \text{IsAgroup}(X\rightarrow M,\mathcal{A} ) \) and \( group0(X\rightarrow M,\mathcal{A} ) \) using group0_valid, Group_ZF_2_1_T2, group0_defA function has the same support as its negative.
lemma (in finsupp1) finsupp_neg:
assumes A1: \( f: X\rightarrow M \)
shows \( supp(f) = supp( \text{GroupInv}(X\rightarrow M,\mathcal{A} )(f)) \)proofThe negative of a function with a finite support is a function with a finite support.
lemma (in finsupp1) finsupp_neg_finsupp:
assumes A1: \( f \in \mathcal{M} \)
shows \( \text{GroupInv}(X\rightarrow M,\mathcal{A} )(f) \in \mathcal{M} \)proofFinitely supported functions form a subgroup with pointwise addition of group-valued functions.
theorem (in finsupp1) fin_sup_group:
shows \( \text{IsAsubgroup}(\mathcal{M} ,\mathcal{A} ) \)proofassumes \( F = f \text{ lifted to function space over } X \)
shows \( F : (X\rightarrow G)\times (X\rightarrow G)\rightarrow (X\rightarrow G) \)assumes \( F = f \text{ lifted to function space over } X \) and \( s:X\rightarrow G \), \( r:X\rightarrow G \) and \( x\in X \)
shows \( (F\langle s,r\rangle )(x) = s(x) \oplus r(x) \)assumes \( f:X \rightarrow M \), \( g:X \rightarrow M \)
shows \( f\oplus g : X\rightarrow M \)assumes \( f:A\rightarrow C \)
shows \( domain(f) = A \)assumes \( f:X \rightarrow M \), \( g:X \rightarrow M \) and \( x \in X \)
shows \( (f\oplus g)(x) = f(x) + g(x) \)assumes \( a \oplus b \neq \text{ TheNeutralElement}(G,f) \)
shows \( a \neq \text{ TheNeutralElement}(G,f) \vee b \neq \text{ TheNeutralElement}(G,f) \)assumes \( A \in \text{FinPow}(X) \) and \( B \in \text{FinPow}(X) \)
shows \( A \cup B \in \text{FinPow}(X) \)assumes \( f:X \rightarrow M \), \( g:X \rightarrow M \)
shows \( supp(f\oplus g) \subseteq supp(f) \cup supp(g) \)assumes \( A \in \text{FinPow}(X) \) and \( B \subseteq A \)
shows \( B \in \text{FinPow}(X) \)assumes \( \text{IsAmonoid}(G,f) \) and \( F = f \text{ lifted to function space over } X \) and \( E = \text{ConstantFunction}(X,\text{ TheNeutralElement}(G,f)) \)
shows \( E = \text{ TheNeutralElement}(X\rightarrow G,F) \)assumes \( e = \text{ TheNeutralElement}(G,f) \)
shows \( e \in G \wedge (\forall g\in G.\ e \oplus g = g \wedge g \oplus e = g) \)assumes \( c\in Y \)
shows \( \text{ConstantFunction}(X,c) : X\rightarrow Y \)assumes \( x\in X \)
shows \( \text{ConstantFunction}(X,c)(x) = c \)assumes \( F = f \text{ lifted to function space over } X \)
shows \( \text{IsAmonoid}(X\rightarrow G,F) \)assumes \( f \in \mathcal{M} \), \( g \in \mathcal{M} \)
shows \( f\oplus g \in \mathcal{M} \)assumes \( H \text{ is closed under } f \) and \( H\subseteq G \) and \( \text{ TheNeutralElement}(G,f) \in H \)
shows \( \text{IsAmonoid}(H,\text{restrict}(f,H\times H)) \)assumes \( F = P \text{ lifted to function space over } X \)
shows \( \text{IsAgroup}(X\rightarrow G,F) \)assumes \( x\in G \)
shows \( x^{-1}\in G \)assumes \( F = P \text{ lifted to function space over } X \) and \( s : X\rightarrow G \) and \( x\in X \)
shows \( ( \text{GroupInv}(X\rightarrow G,F)(s))(x) = (s(x))^{-1} \)assumes \( a\in G \) and \( a^{-1} \neq 1 \)
shows \( a\neq 1 \)assumes \( a\in G \) and \( a \neq 1 \)
shows \( a^{-1} \neq 1 \)assumes \( f: X\rightarrow M \)
shows \( supp(f) = supp( \text{GroupInv}(X\rightarrow M,\mathcal{A} )(f)) \)assumes \( f \in \mathcal{M} \)
shows \( \text{GroupInv}(X\rightarrow M,\mathcal{A} )(f) \in \mathcal{M} \)assumes \( H\neq 0 \) and \( H\subseteq G \) and \( H \text{ is closed under } P \) and \( \forall x\in H.\ x^{-1} \in H \)
shows \( \text{IsAsubgroup}(H,P) \)