ring tactic #
A tactic for solving equations in commutative (semi)rings, where the exponents can also contain variables. Based on http://www.cs.ru.nl/~freek/courses/tt-2014/read/10.1.1.61.3041.pdf .
More precisely, expressions of the following form are supported:
- constants (non-negative integers)
- variables
- coefficients (any rational number, embedded into the (semi)ring)
- addition of expressions
- multiplication of expressions (
a * b) - scalar multiplication of expressions (
n • a; the multiplier must have typeℕ) - exponentiation of expressions (the exponent must have type
ℕ) - subtraction and negation of expressions (if the base is a full ring)
The normalization procedure is implemented in Mathlib.Tactic.Ring.Common.
Tags #
ring, semiring, exponent, power
CSLift α β is a typeclass used by ring for lifting operations from α
(which is not a commutative semiring) into a commutative semiring β by using an injective map
lift : α → β.
- lift : α → β
liftis the "canonical injection" fromαtoβ - inj : Function.Injective lift
liftis an injective function
Instances
This is a routine which is used to clean up the unsolved subgoal
of a failed ring1 application. It is overridden in Mathlib/Tactic/Ring/RingNF.lean
to apply the ring_nf simp set to the goal.
Frontend of ring1: attempt to close a goal g, assuming it is an equation of semirings.
Equations
- One or more equations did not get rendered due to their size.
Instances For
ring1 solves the goal when it is an equality in commutative (semi)rings,
allowing variables in the exponent.
This version of ring fails if the target is not an equality.
ring1!uses a more aggressive reducibility setting to determine equality of atoms.
Equations
- One or more equations did not get rendered due to their size.
Instances For
ring1 solves the goal when it is an equality in commutative (semi)rings,
allowing variables in the exponent.
This version of ring fails if the target is not an equality.
ring1!uses a more aggressive reducibility setting to determine equality of atoms.
Equations
- Mathlib.Tactic.Ring.tacticRing1! = Lean.ParserDescr.node `Mathlib.Tactic.Ring.tacticRing1! 1024 (Lean.ParserDescr.nonReservedSymbol "ring1!" false)