Skip to content

Commit fa0a23a

Browse files
committed
remove some distracting errors
still room to do better!
1 parent 47c6981 commit fa0a23a

12 files changed

+3
-111
lines changed

crates/formality-prove/src/prove/prove_normalize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ judgment_fn! {
2323
debug(p, assumptions, env, decls)
2424

2525
(
26-
(&assumptions => a)
26+
(&assumptions => a)!
2727
(prove_normalize_via(&decls, &env, &assumptions, a, &goal) => c)
2828
----------------------------- ("normalize-via-assumption")
2929
(prove_normalize(decls, env, assumptions, goal) => c)

crates/formality-prove/src/prove/prove_via.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ judgment_fn! {
2828
(
2929
(let (skel_c, parameters_c) = relation.debone())
3030
(let (skel_g, parameters_g) = goal.debone())
31-
(if skel_c == skel_g)!
32-
(if parameters_c == parameters_g) // for relations, we require 100% match
31+
(if skel_c == skel_g)
32+
(if parameters_c == parameters_g)! // for relations, we require 100% match
3333
----------------------------- ("relation-axiom")
3434
(prove_via(_decls, env, _assumptions, PR::Relation(relation), goal) => Constraints::none(env))
3535
)

crates/formality-prove/src/test/eq_assumptions.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ fn test_normalize_assoc_ty_existential0() {
5959
judgment `prove_wc { goal: if {<!ty_1 as Iterator>::Item = u32} <?ty_0 as Iterator>::Item = u32, assumptions: {}, env: Env { variables: [?ty_0, !ty_1], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
6060
the rule "implies" failed at step #0 (src/file.rs:LL:CC) because
6161
judgment `prove_wc { goal: <?ty_0 as Iterator>::Item = u32, assumptions: {<!ty_1 as Iterator>::Item = u32}, env: Env { variables: [?ty_0, !ty_1], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
62-
the rule "assumption" failed at step #1 (src/file.rs:LL:CC) because
63-
judgment `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], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
64-
the rule "relation-axiom" failed at step #3 (src/file.rs:LL:CC) because
65-
condition evaluted to false: `parameters_c == parameters_g`
6662
the rule "eq" failed at step #0 (src/file.rs:LL:CC) because
6763
judgment `prove_eq { a: <?ty_0 as Iterator>::Item, b: u32, assumptions: {<!ty_1 as Iterator>::Item = u32}, env: Env { variables: [?ty_0, !ty_1], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
6864
the rule "normalize-l" failed at step #0 (src/file.rs:LL:CC) because
@@ -101,20 +97,12 @@ fn test_normalize_assoc_ty_existential0() {
10197
judgment `prove_wc_list { goal: {<!ty_0 as Iterator>::Item = <?ty_1 as Iterator>::Item}, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
10298
the rule "some" failed at step #0 (src/file.rs:LL:CC) because
10399
judgment `prove_wc { goal: <!ty_0 as Iterator>::Item = <?ty_1 as Iterator>::Item, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
104-
the rule "assumption" failed at step #1 (src/file.rs:LL:CC) because
105-
judgment `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], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
106-
the rule "relation-axiom" failed at step #3 (src/file.rs:LL:CC) because
107-
condition evaluted to false: `parameters_c == parameters_g`
108100
the rule "eq" failed at step #0 (src/file.rs:LL:CC) because
109101
judgment `prove_eq { a: <!ty_0 as Iterator>::Item, b: <?ty_1 as Iterator>::Item, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
110102
the rule "alias" failed at step #3 (src/file.rs:LL:CC) because
111103
judgment `prove_wc_list { goal: {!ty_0 = ?ty_1}, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
112104
the rule "some" failed at step #0 (src/file.rs:LL:CC) because
113105
judgment `prove_wc { goal: !ty_0 = ?ty_1, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
114-
the rule "assumption" failed at step #1 (src/file.rs:LL:CC) because
115-
judgment `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], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
116-
the rule "relation-axiom" failed at step #3 (src/file.rs:LL:CC) because
117-
condition evaluted to false: `parameters_c == parameters_g`
118106
the rule "eq" failed at step #0 (src/file.rs:LL:CC) because
119107
judgment `prove_eq { a: !ty_0, b: ?ty_1, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
120108
the rule "symmetric" failed at step #0 (src/file.rs:LL:CC) because
@@ -131,10 +119,6 @@ fn test_normalize_assoc_ty_existential0() {
131119
judgment `prove_wc_list { goal: {u32 = <?ty_1 as Iterator>::Item}, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
132120
the rule "some" failed at step #0 (src/file.rs:LL:CC) because
133121
judgment `prove_wc { goal: u32 = <?ty_1 as Iterator>::Item, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
134-
the rule "assumption" failed at step #1 (src/file.rs:LL:CC) because
135-
judgment `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], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
136-
the rule "relation-axiom" failed at step #3 (src/file.rs:LL:CC) because
137-
condition evaluted to false: `parameters_c == parameters_g`
138122
the rule "eq" failed at step #0 (src/file.rs:LL:CC) because
139123
judgment `prove_eq { a: u32, b: <?ty_1 as Iterator>::Item, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
140124
the rule "symmetric" failed at step #0 (src/file.rs:LL:CC) because
@@ -173,10 +157,6 @@ fn test_normalize_assoc_ty_existential0() {
173157
judgment `prove_wc_list { goal: {?ty_1 = !ty_0}, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
174158
the rule "some" failed at step #0 (src/file.rs:LL:CC) because
175159
judgment `prove_wc { goal: ?ty_1 = !ty_0, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
176-
the rule "assumption" failed at step #1 (src/file.rs:LL:CC) because
177-
judgment `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], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
178-
the rule "relation-axiom" failed at step #3 (src/file.rs:LL:CC) because
179-
condition evaluted to false: `parameters_c == parameters_g`
180160
the rule "eq" failed at step #0 (src/file.rs:LL:CC) because
181161
judgment `prove_eq { a: ?ty_1, b: !ty_0, assumptions: {<!ty_0 as Iterator>::Item = u32}, env: Env { variables: [?ty_1, !ty_0], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
182162
the rule "existential" failed at step #0 (src/file.rs:LL:CC) because

crates/formality-prove/src/test/is_local.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ fn test_forall_not_local() {
2020
judgment `prove_wc { goal: @ IsLocal(Debug(!ty_1)), assumptions: {}, env: Env { variables: [!ty_1], coherence_mode: true }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
2121
the rule "trait ref is local" failed at step #0 (src/file.rs:LL:CC) because
2222
judgment `is_local_trait_ref { goal: Debug(!ty_1), assumptions: {}, env: Env { variables: [!ty_1], coherence_mode: true }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
23-
the rule "local parameter" failed at step #1 (src/file.rs:LL:CC) because
24-
judgment `is_local_parameter { goal: !ty_1, assumptions: {}, env: Env { variables: [!ty_1], coherence_mode: true }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
25-
the rule "local parameter" failed at step #0 (src/file.rs:LL:CC) because
26-
judgment `prove_normalize { p: !ty_1, assumptions: {}, env: Env { variables: [!ty_1], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
27-
the rule "normalize-via-assumption" failed at step #0 (src/file.rs:LL:CC) because
28-
expression evaluated to an empty collection: `&assumptions`
2923
the rule "local trait" failed at step #0 (src/file.rs:LL:CC) because
3024
condition evaluted to false: `decls.is_local_trait_id(&goal.trait_id)`
3125
"#]]);

crates/formality-prove/src/test/occurs_check.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ fn direct_cycle() {
3131
judgment `equate_variable` failed at the following rule(s):
3232
failed at (src/file.rs:LL:CC) because
3333
`?ty_0` occurs in `Vec<?ty_0>`
34-
the rule "normalize-l" failed at step #0 (src/file.rs:LL:CC) because
35-
judgment `prove_normalize { p: ?ty_0, assumptions: {}, env: Env { variables: [?ty_0], coherence_mode: false }, decls: decls(222, [trait Foo <ty> ], [impl <ty> Foo(Vec<^ty0_0>)], [], [], [], [], {}, {}) }` failed at the following rule(s):
36-
the rule "normalize-via-assumption" failed at step #0 (src/file.rs:LL:CC) because
37-
expression evaluated to an empty collection: `&assumptions`
38-
the rule "symmetric" failed at step #0 (src/file.rs:LL:CC) because
39-
judgment `prove_eq { a: Vec<?ty_0>, b: ?ty_0, assumptions: {}, env: Env { variables: [?ty_0], coherence_mode: false }, decls: decls(222, [trait Foo <ty> ], [impl <ty> Foo(Vec<^ty0_0>)], [], [], [], [], {}, {}) }` failed at the following rule(s):
40-
the rule "normalize-l" failed at step #0 (src/file.rs:LL:CC) because
41-
judgment `prove_normalize { p: Vec<?ty_0>, assumptions: {}, env: Env { variables: [?ty_0], coherence_mode: false }, decls: decls(222, [trait Foo <ty> ], [impl <ty> Foo(Vec<^ty0_0>)], [], [], [], [], {}, {}) }` failed at the following rule(s):
42-
the rule "normalize-via-assumption" failed at step #0 (src/file.rs:LL:CC) because
43-
expression evaluated to an empty collection: `&assumptions`
4434
"#]]);
4535
}
4636

@@ -87,16 +77,6 @@ fn indirect_cycle_1() {
8777
judgment `equate_variable` failed at the following rule(s):
8878
failed at (src/file.rs:LL:CC) because
8979
`?ty_0` occurs in `Vec<?ty_0>`
90-
the rule "normalize-l" failed at step #0 (src/file.rs:LL:CC) because
91-
judgment `prove_normalize { p: ?ty_0, assumptions: {}, env: Env { variables: [?ty_0], coherence_mode: false }, decls: decls(222, [trait Foo <ty> ], [impl <ty> Foo(Vec<^ty0_0>)], [], [], [], [], {}, {}) }` failed at the following rule(s):
92-
the rule "normalize-via-assumption" failed at step #0 (src/file.rs:LL:CC) because
93-
expression evaluated to an empty collection: `&assumptions`
94-
the rule "symmetric" failed at step #0 (src/file.rs:LL:CC) because
95-
judgment `prove_eq { a: Vec<?ty_0>, b: ?ty_0, assumptions: {}, env: Env { variables: [?ty_0], coherence_mode: false }, decls: decls(222, [trait Foo <ty> ], [impl <ty> Foo(Vec<^ty0_0>)], [], [], [], [], {}, {}) }` failed at the following rule(s):
96-
the rule "normalize-l" failed at step #0 (src/file.rs:LL:CC) because
97-
judgment `prove_normalize { p: Vec<?ty_0>, assumptions: {}, env: Env { variables: [?ty_0], coherence_mode: false }, decls: decls(222, [trait Foo <ty> ], [impl <ty> Foo(Vec<^ty0_0>)], [], [], [], [], {}, {}) }` failed at the following rule(s):
98-
the rule "normalize-via-assumption" failed at step #0 (src/file.rs:LL:CC) because
99-
expression evaluated to an empty collection: `&assumptions`
10080
"#]]);
10181
}
10282

@@ -123,15 +103,5 @@ fn indirect_cycle_2() {
123103
judgment `equate_variable` failed at the following rule(s):
124104
failed at (src/file.rs:LL:CC) because
125105
`?ty_0` occurs in `Vec<?ty_0>`
126-
the rule "normalize-l" failed at step #0 (src/file.rs:LL:CC) because
127-
judgment `prove_normalize { p: ?ty_0, assumptions: {}, env: Env { variables: [?ty_0], coherence_mode: false }, decls: decls(222, [trait Foo <ty> ], [impl <ty> Foo(Vec<^ty0_0>)], [], [], [], [], {}, {}) }` failed at the following rule(s):
128-
the rule "normalize-via-assumption" failed at step #0 (src/file.rs:LL:CC) because
129-
expression evaluated to an empty collection: `&assumptions`
130-
the rule "symmetric" failed at step #0 (src/file.rs:LL:CC) because
131-
judgment `prove_eq { a: Vec<?ty_0>, b: ?ty_0, assumptions: {}, env: Env { variables: [?ty_0], coherence_mode: false }, decls: decls(222, [trait Foo <ty> ], [impl <ty> Foo(Vec<^ty0_0>)], [], [], [], [], {}, {}) }` failed at the following rule(s):
132-
the rule "normalize-l" failed at step #0 (src/file.rs:LL:CC) because
133-
judgment `prove_normalize { p: Vec<?ty_0>, assumptions: {}, env: Env { variables: [?ty_0], coherence_mode: false }, decls: decls(222, [trait Foo <ty> ], [impl <ty> Foo(Vec<^ty0_0>)], [], [], [], [], {}, {}) }` failed at the following rule(s):
134-
the rule "normalize-via-assumption" failed at step #0 (src/file.rs:LL:CC) because
135-
expression evaluated to an empty collection: `&assumptions`
136106
"#]]);
137107
}

crates/formality-prove/src/test/universes.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ fn exists_u_for_t() {
1919
judgment `prove_wc { goal: !ty_1 = ?ty_0, assumptions: {}, env: Env { variables: [?ty_0, !ty_1], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
2020
the rule "eq" failed at step #0 (src/file.rs:LL:CC) because
2121
judgment `prove_eq { a: !ty_1, b: ?ty_0, assumptions: {}, env: Env { variables: [?ty_0, !ty_1], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
22-
the rule "normalize-l" failed at step #0 (src/file.rs:LL:CC) because
23-
judgment `prove_normalize { p: !ty_1, assumptions: {}, env: Env { variables: [?ty_0, !ty_1], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
24-
the rule "normalize-via-assumption" failed at step #0 (src/file.rs:LL:CC) because
25-
expression evaluated to an empty collection: `&assumptions`
2622
the rule "symmetric" failed at step #0 (src/file.rs:LL:CC) because
2723
judgment `prove_eq { a: ?ty_0, b: !ty_1, assumptions: {}, env: Env { variables: [?ty_0, !ty_1], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
2824
the rule "existential" failed at step #0 (src/file.rs:LL:CC) because
@@ -31,10 +27,6 @@ fn exists_u_for_t() {
3127
pattern `None` did not match value `Some(!ty_1)`
3228
the rule "existential-universal" failed at step #0 (src/file.rs:LL:CC) because
3329
condition evaluted to false: `env.universe(p) < env.universe(v)`
34-
the rule "normalize-l" failed at step #0 (src/file.rs:LL:CC) because
35-
judgment `prove_normalize { p: ?ty_0, assumptions: {}, env: Env { variables: [?ty_0, !ty_1], coherence_mode: false }, decls: decls(222, [], [], [], [], [], [], {}, {}) }` failed at the following rule(s):
36-
the rule "normalize-via-assumption" failed at step #0 (src/file.rs:LL:CC) because
37-
expression evaluated to an empty collection: `&assumptions`
3830
"#]]);
3931
}
4032

0 commit comments

Comments
 (0)