Formula synthesis with certified polarity #
PolarityDefinable strengthens uniform definability by requiring a syntactic polarity
certificate for the same defining formula. This lets a fixed-point synthesis rule construct
its body from a Lean predicate while checking that recursive relation occurrences are positive.
Monotonicity is never assumed in place of this syntactic check.
The compositional rules are registered in FODefinable, so fo_definable handles these goals
as well as ordinary Definable goals. Negation reverses the requested polarity; marked relation
atoms are available only positively. Unmarked relation atoms are available with either sign.
Main definitions #
PolarityDefinable: one well-formed, polarity-checked formula for a family of predicates.
Main results #
PolarityDefinable.toDefinable: forget the additional polarity certificate.PolarityDefinable.neg,PolarityDefinable.conj,PolarityDefinable.disj,PolarityDefinable.ex,PolarityDefinable.all: compositional synthesis rules.PolarityDefinable.head_vars: a positive recursive atom in the nearest relation binder.
Uniform definability with a syntactic polarity check on the defining formula itself.
Instances For
Forget the polarity requirement while retaining the well-formed defining formula.
Equivalent semantic presentations use the same syntax and polarity certificate.
Native first-order formulas are independent of all scoped relation variables.
Negation reverses the required polarity of its body.
Conjunction preserves the polarity of both bodies.
Derived disjunction preserves the polarity of both bodies.
Implication reverses polarity in its antecedent and preserves it in its consequent.
Existential quantification preserves polarity while binding a fresh first-order variable.
Universal quantification preserves polarity while binding a fresh first-order variable.
The constant true predicate has either polarity.
The constant false predicate has either polarity.
Equality of native terms has either polarity.
Equality of variables is an atomic polarity-aware synthesis rule.
Native vocabulary relations have either polarity in scoped relation variables.
Native vocabulary relations applied to variable tuples have either polarity.
Binary vocabulary relations in vector notation are atomic synthesis rules.
A scoped relation atom is positive in every marked relation.
An unmarked relation atom has either polarity.
Variable arguments give the usual positive relation application.
Unmarked relation variables can be applied to variables at either polarity.
Direct membership in the nearest bound relation is a positive atom. This form lets synthesis start from the ordinary relation predicate, without reconstructing a relation index.