Wilson's theorem
import /Freeks/6.book
1 Partial products
word(s,s) …
\(!\)For factorials we assume the following recurrence.
!𝕄 …
\(\begin{cases} 0 ! = 1 \\ n \in \mathbb{M} \Longrightarrow ( n + 1 ) ! = n ! \cdot ( n + 1 ) \end{cases}\) For a sequence \(g\), the product of its first \(n\) terms is expressed by the sequence of partial products \(P\) (\(P(0) = 1\), and if \(i < n\) then \(P(i+1) = P(i) \cdot g(i)\)), as its \(n\)-th term \(P(n)\). If all values are 1, the product is 1; if all values are natural numbers, it is a natural number; equal values give equal products; if \(g(i) = i + 1\), it is \(n!\); changing the value at one point to 1 divides the product by the original value.
We take as an axiom of this section that every sequence has a sequence of partial products (PRD) (definition by recursion).
PRD …
\(\exists P \, ( P ( 0 ) = 1 , \forall i \in \mathbb{M} . P ( i + 1 ) = P ( i ) \cdot g ( i ) )\) If all values are 1, the product is 1.
Pone …
\(K \in \mathbb{M} , P ( 0 ) = 1 , \forall i \in \mathbb{M} . ( i < K \Longrightarrow P ( i + 1 ) = P ( i ) \cdot g ( i ) ) , \forall i \in \mathbb{M} . ( i < K \Longrightarrow g ( i ) = 1 ) \Longrightarrow \forall m \in \mathbb{M} . ( m < K + 1 \Longrightarrow P ( m ) = 1 )\) \(\blacktriangleleft\) ⋅𝕄:D ,\(\mathbb{W}.\) ,AxℤIf all values are natural numbers, the product is a natural number.
Pmem …
\(K \in \mathbb{M} , P ( 0 ) = 1 , \forall i \in \mathbb{M} . ( i < K \Longrightarrow P ( i + 1 ) = P ( i ) \cdot g ( i ) ) , \forall i \in \mathbb{M} . ( i < K \Longrightarrow g ( i ) \in \mathbb{M} ) \Longrightarrow \forall m \in \mathbb{M} . ( m < K + 1 \Longrightarrow P ( m ) \in \mathbb{M} )\) \(\blacktriangleleft\) ⋅𝕄:D ,\(\mathbb{W}.\) ,AxℤIf the values are equal, the products are equal.
Pagr …
\(K \in \mathbb{M} , Q ( 0 ) = 1 , \forall i \in \mathbb{M} . ( i < K \Longrightarrow Q ( i + 1 ) = Q ( i ) \cdot h ( i ) ) , P ( 0 ) = 1 , \forall i \in \mathbb{M} . ( i < K \Longrightarrow P ( i + 1 ) = P ( i ) \cdot g ( i ) ) , \forall i \in \mathbb{M} . ( i < K \Longrightarrow h ( i ) = g ( i ) ) \Longrightarrow \forall m \in \mathbb{M} . ( m < K + 1 \Longrightarrow Q ( m ) = P ( m ) )\) \(\blacktriangleleft\) ⋅𝕄:D ,\(\mathbb{W}.\) ,AxℤThe product for \(g(i) = i + 1\) (\(i < n\)) is \(n!\).
Pfac …
\(K \in \mathbb{M} , P ( 0 ) = 1 , \forall i \in \mathbb{M} . ( i < K \Longrightarrow P ( i + 1 ) = P ( i ) \cdot g ( i ) ) , \forall i \in \mathbb{M} . ( i < K \Longrightarrow g ( i ) = i + 1 ) \Longrightarrow \forall m \in \mathbb{M} . ( m < K + 1 \Longrightarrow P ( m ) = m ! )\) \(\blacktriangleleft\) !𝕄 ,⋅𝕄:D ,\(\mathbb{W}.\) ,AxℤWe take as an axiom of this section that there is a sequence obtained by changing the value at a single point (UPD).
UPD …
\(\exists h \, ( h ( k ) = v , \forall i \in \mathbb{M} . ( i \neq k \Longrightarrow h ( i ) = g ( i ) ) )\) For every \(n\), there is a sequence with \(g(i) = i + 1\) (\(i < n\)) (induction on \(n\); add points one at a time by UPD).
Pexg …
\(n \in \mathbb{M} \Longrightarrow \exists g \, \forall i \in \mathbb{M} . ( i < n \Longrightarrow g ( i ) = i + 1 )\) \(\blacktriangleleft\) UPD ,\(\mathbb{W}.\) ,AxℤChange only the value at one point (\(k\)) to 1 and call the resulting sequence \(h\): its product multiplied by the original value \(g(k)\) gives the original product (induction on \(n\)).
Pupd …
\(K \in \mathbb{M} , Q ( 0 ) = 1 , \forall i \in \mathbb{M} . ( i < K \Longrightarrow Q ( i + 1 ) = Q ( i ) \cdot h ( i ) ) , P ( 0 ) = 1 , \forall i \in \mathbb{M} . ( i < K \Longrightarrow P ( i + 1 ) = P ( i ) \cdot g ( i ) ) , k \in \mathbb{M} , k < K , h ( k ) = 1 , \forall i \in \mathbb{M} . ( i \neq k \Longrightarrow h ( i ) = g ( i ) ) , \forall i \in \mathbb{M} . ( i < K \Longrightarrow g ( i ) \in \mathbb{M} ) \Longrightarrow Q ( K ) \cdot g ( k ) = P ( K )\) \(\blacktriangleleft\) Pmem ,Pagr ,⋅𝕄:D ,\(\mathbb{W}.\) ,Axℤ