Worked examples
Two questions run through Electric 2.21.1. Each includes the input used for the run and what its result establishes.
EXACT ALGEBRA
Factor a polynomial
Ask for the factors of x6 − 1 over the rational numbers. Electric returns four factors, each with multiplicity one. Multiplying them back together recovers the input exactly.
Download factorization input (JSON)- Input polynomial
- x6 − 1
- Factorization over ℚ
- (x − 1)(x + 1) (x2 − x + 1) (x2 + x + 1)
- What was checked
- The product was reconstructed exactly. Irreducibility of the factors comes from FLINT’s factorization algorithm.
COUNTEREXAMPLE SEARCH
When does the prime pattern break?
At n = 0, 1, and 2, the expression n2 + n + 41 gives the primes 41, 43, and 47. Ask Electric to test primality at successive integers from 0 through 50.
Download counterexample input (JSON)- First counterexample
- n = 40
- Substitution
- 402 + 40 + 41 = 1,681 = 412
- What was checked
- The search tested 41 integers and stopped at 40. Electric rechecked that input against the domain and the primality test. One composite value settles the “always prime” claim.
Both JSON files are request objects for the electric_math tool. Use the evaluate action in a configured Electric workspace.