pub enum WrapperDriver {
List,
PeanoNat {
type_name: String,
value_first: bool,
},
}Expand description
Algebraic / proof-theoretic shape of a verify-law theorem.
Naming rule: variants describe what the law says, not
how a backend proves it. The IR is target-agnostic — Lean
maps Commutative { op: Add } to simp [fn, Int.add_comm],
Dafny maps the same variant to its own lemma vocabulary, a Z3
backend could ship a different tactic again. Tactic names
(SimpOverLemmas, simp+omega) do not appear in variant names;
Driver of a ProofStrategy::WrapperOverRecursion inner loop —
the structure the recursion shrinks. List is the original
sum_acc shape (match xs { [] -> acc; h::t -> loop(t, step) });
PeanoNat is the factTR countdown (match n { Z -> acc; S(m) -> loop(m, combine(n, acc)) }). The two need different induction
skeletons (nil/cons vs zero/succ) and, for Mul, different
closing tactics (omega can’t discharge a nonlinear residual).
Variants§
List
Structural fold over a List<_> first parameter.
PeanoNat
Countdown over a Peano-Nat ADT first parameter. Carries the
ADT’s source type name and whether the folded value (the matched
subject) is the combine fn’s FIRST argument (mul(n, acc) →
true; mul(acc, n) → false) so the backend rewrite matches
the def’s actual step term.
Trait Implementations§
Source§impl Clone for WrapperDriver
impl Clone for WrapperDriver
Source§fn clone(&self) -> WrapperDriver
fn clone(&self) -> WrapperDriver
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WrapperDriver
impl Debug for WrapperDriver
impl Eq for WrapperDriver
Source§impl PartialEq for WrapperDriver
impl PartialEq for WrapperDriver
Source§fn eq(&self, other: &WrapperDriver) -> bool
fn eq(&self, other: &WrapperDriver) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WrapperDriver
Auto Trait Implementations§
impl Freeze for WrapperDriver
impl RefUnwindSafe for WrapperDriver
impl Send for WrapperDriver
impl Sync for WrapperDriver
impl Unpin for WrapperDriver
impl UnsafeUnpin for WrapperDriver
impl UnwindSafe for WrapperDriver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.