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

Negative coverage: prove_normalize / normalize-via-impl / premise decl in decls.alias_eq_decls(&a.name)

Premise at line 39. Observed failure causes: empty_collection.

normalize-via-impl
LineCoverageSource
391(decl in decls.alias_eq_decls(&a.name))
40N/A(let (env, subst) = env.existential_substitution(&decl.binder))
41N/A(let decl = decl.binder.instantiate_with(&subst).unwrap())
42N/A(let AliasEqDeclBoundData { alias: AliasTy { name, parameters }, ty, where_clause } = decl)
43(assert a.name == *name)
44(prove(decls, env, assumptions, Wcs::all_eq(&a.parameters, &parameters)) => c)
45(prove_after(decls, c, assumptions, &where_clause) => c)
46N/A(let ty = c.substitution().apply(ty))
47N/A(let c = c.pop_subst(&subst))
48(assert c.env().encloses(&ty))
──────── ("normalize-via-impl")
5027(prove_normalize(decls, env, assumptions, TyData::AliasTy(a)) => Constrained(ty, c))

1 test failed proving this premise:


Source location: crates/formality-rust/src/prove/prove/test/eq_assumptions.rs:41

#[test]
fn test_normalize_assoc_ty_existential0() {
    test_prove(
        Program::empty(),
        term("exists<A> {} => {for<T> if { <T as Iterator>::Item = u32 } <A as Iterator>::Item = u32}"),
    ).assert_err(
    expect![[r#"
        crates/formality-rust/src/prove/prove/prove/prove_via.rs:9:1: no applicable rules for prove_via { goal: <?ty_0 as Iterator>::Item = u32, via: <!ty_1 as Iterator>::Item = u32, assumptions: {<!ty_1 as Iterator>::Item = u32}, env: Env { variables: [?ty_0, !ty_1], bias: Soundness, pending: [], allow_pending_outlives: false } }

        the rule "existential-nonvar" at (prove_eq.rs) failed because
          pattern `None` did not match value `Some(!ty_1)`

        the rule "existential-universal" at (prove_eq.rs) failed because
          condition evaluated to false: `env.universe(p) < env.universe(v)`

        the rule "existential-nonvar" at (prove_eq.rs) failed because
          pattern `None` did not match value `Some(!ty_1)`

        the rule "existential-universal" at (prove_eq.rs) failed because
          condition evaluated to false: `env.universe(p) < env.universe(v)`

        the rule "normalize-via-impl" at (prove_normalize.rs) failed because
          expression evaluated to an empty collection: `decls.alias_eq_decls(&a.name)`

        crates/formality-rust/src/prove/prove/prove/prove_via.rs:9:1: no applicable rules for prove_via { goal: <!ty_0 as Iterator>::Item = <?ty_1 as Iterator>::Item, via: <!ty_0 as Iterator>::Item = u32, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

        crates/formality-rust/src/prove/prove/prove/prove_via.rs:9:1: no applicable rules for prove_via { goal: !ty_0 = ?ty_1, via: <!ty_0 as Iterator>::Item = u32, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

        the rule "existential-nonvar" at (prove_eq.rs) failed because
          pattern `None` did not match value `Some(!ty_0)`

        the rule "existential-universal" at (prove_eq.rs) failed because
          condition evaluated to false: `env.universe(p) < env.universe(v)`

        crates/formality-rust/src/prove/prove/prove/prove_normalize.rs:55:1: no applicable rules for prove_normalize_via { goal: ?ty_1, via: <!ty_0 as Iterator>::Item = u32, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

        crates/formality-rust/src/prove/prove/prove/prove_via.rs:9:1: no applicable rules for prove_via { goal: u32 = <?ty_1 as Iterator>::Item, via: <!ty_0 as Iterator>::Item = u32, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

        the rule "existential-nonvar" at (prove_eq.rs) failed because
          pattern `None` did not match value `Some(!ty_0)`

        the rule "existential-universal" at (prove_eq.rs) failed because
          condition evaluated to false: `env.universe(p) < env.universe(v)`

        the rule "existential-nonvar" at (prove_eq.rs) failed because
          pattern `None` did not match value `Some(!ty_0)`

        the rule "existential-universal" at (prove_eq.rs) failed because
          condition evaluated to false: `env.universe(p) < env.universe(v)`

        the rule "normalize-via-impl" at (prove_normalize.rs) failed because
          expression evaluated to an empty collection: `decls.alias_eq_decls(&a.name)`

        crates/formality-rust/src/prove/prove/prove/prove_via.rs:9:1: no applicable rules for prove_via { goal: ?ty_1 = !ty_0, via: <!ty_0 as Iterator>::Item = u32, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

        the rule "existential-nonvar" at (prove_eq.rs) failed because
          pattern `None` did not match value `Some(!ty_0)`

        the rule "existential-universal" at (prove_eq.rs) failed because
          condition evaluated to false: `env.universe(p) < env.universe(v)`

        crates/formality-rust/src/prove/prove/prove/prove_normalize.rs:55:1: no applicable rules for prove_normalize_via { goal: ?ty_1, via: <!ty_0 as Iterator>::Item = u32, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

        the rule "existential-nonvar" at (prove_eq.rs) failed because
          pattern `None` did not match value `Some(!ty_0)`

        the rule "existential-universal" at (prove_eq.rs) failed because
          condition evaluated to false: `env.universe(p) < env.universe(v)`

        the rule "existential-nonvar" at (prove_eq.rs) failed because
          pattern `None` did not match value `Some(!ty_0)`

        the rule "existential-universal" at (prove_eq.rs) failed because
          condition evaluated to false: `env.universe(p) < env.universe(v)`

        the rule "normalize-via-impl" at (prove_normalize.rs) failed because
          expression evaluated to an empty collection: `decls.alias_eq_decls(&a.name)`"#]]);
}
Failed proof tree