Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Judgment is_local_parameter

judgment_fn! {
    fn is_local_parameter(
        _decls: Program,
        env: Env,
        assumptions: Predicates,
        goal: Parameter,
    ) => Constraints {
        /* rules omitted */
    }
}

Source: crates/formality-rust/src/prove/is_local.rs:293

The number on each rule’s conclusion is positive coverage; the number on each premise is negative coverage. Click a number to browse the tests.

local parameter
LineCoverageSource
30512(prove_normalize(decls, env, assumptions, goal) => Constrained(p, c1))
306N/A(let assumptions = c1.substitution().apply(assumptions))
3072(is_local_parameter(decls, c1.env(), assumptions, p) => c2)
──────── ("local parameter")
3091(is_local_parameter(decls, env, assumptions, goal) => c1.seq(c2))
fundamental rigid type
LineCoverageSource
3147(if is_fundamental(decls, name))
315N/A(let type_params: Vec<Parameter> = parameters.iter().filter(|p| !matches!(p, Parameter::Lt(_))).cloned().collect())
3165(for_all(decls, env, assumptions, type_params, &is_local_parameter) => c)
──────── ("fundamental rigid type")
3182(is_local_parameter(decls, env, assumptions, RigidTy { name, parameters }) => c)
local rigid type
LineCoverageSource
3235(if decls.is_local_adt_id(a))
──────── ("local rigid type")
32513(is_local_parameter(decls, env, _assumptions, RigidTy { name: RigidName::AdtId(a), parameters: _ }) => Constraints::none(env))
existential variable
LineCoverageSource
──────── ("existential variable")
3311(is_local_parameter(_decls, env, _assumptions, Ty::Variable(Variable::ExistentialVar(_))) => Constraints::none(env).ambiguous())

How to read this page