Skip to content

Commit a405fec

Browse files
committed
more name simplification
1 parent 91c8fe6 commit a405fec

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

crates/formality-prove/src/prove.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ mod constraints;
22
mod env;
33
mod minimize;
44
mod prove_after;
5-
mod prove_apr;
6-
mod prove_apr_via;
5+
mod prove_pr;
6+
mod prove_pr_via;
77
mod prove_eq;
88
mod prove_normalize;
99
mod prove_wc;

crates/formality-prove/src/prove/prove_apr.rs renamed to crates/formality-prove/src/prove/prove_pr.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ use crate::{
99
env::Env,
1010
prove,
1111
prove_after::prove_after,
12-
prove_apr_via::prove_apr_via,
1312
prove_eq::{all_eq, prove_ty_eq},
13+
prove_pr_via::prove_pr_via,
1414
},
1515
};
1616

1717
use super::constraints::Constraints;
1818

1919
judgment_fn! {
20-
pub fn prove_apr(
20+
pub fn prove_pr(
2121
decls: Decls,
2222
env: Env,
2323
assumptions: Wcs,
@@ -27,9 +27,9 @@ judgment_fn! {
2727

2828
(
2929
(&assumptions => a)
30-
(prove_apr_via(&decls, &env, &assumptions, a, &goal) => c)
30+
(prove_pr_via(&decls, &env, &assumptions, a, &goal) => c)
3131
----------------------------- ("assumption")
32-
(prove_apr(decls, env, assumptions, goal) => c)
32+
(prove_pr(decls, env, assumptions, goal) => c)
3333
)
3434

3535
(
@@ -42,23 +42,23 @@ judgment_fn! {
4242
(prove_after(&decls, c, &co_assumptions, &i.where_clause) => c)
4343
(prove_after(&decls, c, &assumptions, &t.where_clause) => c)
4444
----------------------------- ("impl")
45-
(prove_apr(decls, env, assumptions, Predicate::IsImplemented(trait_ref)) => c.pop_subst(&subst))
45+
(prove_pr(decls, env, assumptions, Predicate::IsImplemented(trait_ref)) => c.pop_subst(&subst))
4646
)
4747

4848
(
4949
(decls.trait_invariants() => ti)
5050
(let (env, subst) = env.existential_substitution(&ti.binder))
5151
(let ti = ti.binder.instantiate_with(&subst).unwrap())
52-
(prove_apr_via(&decls, env, &assumptions, &ti.where_clause, &trait_ref) => c)
52+
(prove_pr_via(&decls, env, &assumptions, &ti.where_clause, &trait_ref) => c)
5353
(prove_after(&decls, c, &assumptions, &ti.trait_ref) => c)
5454
----------------------------- ("trait implied bound")
55-
(prove_apr(decls, env, assumptions, Predicate::IsImplemented(trait_ref)) => c.pop_subst(&subst))
55+
(prove_pr(decls, env, assumptions, Predicate::IsImplemented(trait_ref)) => c.pop_subst(&subst))
5656
)
5757

5858
(
5959
(prove_ty_eq(decls, env, assumptions, a, b) => c)
6060
----------------------------- ("eq")
61-
(prove_apr(decls, env, assumptions, Relation::Equals(Parameter::Ty(a), Parameter::Ty(b))) => c)
61+
(prove_pr(decls, env, assumptions, Relation::Equals(Parameter::Ty(a), Parameter::Ty(b))) => c)
6262
)
6363
}
6464
}

crates/formality-prove/src/prove/prove_apr_via.rs renamed to crates/formality-prove/src/prove/prove_pr_via.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{
1111
};
1212

1313
judgment_fn! {
14-
pub fn prove_apr_via(
14+
pub fn prove_pr_via(
1515
decls: Decls,
1616
env: Env,
1717
assumptions: Wcs,
@@ -26,7 +26,7 @@ judgment_fn! {
2626
(if skel_c == skel_g)
2727
(prove(decls, env, assumptions, all_eq(parameters_c, parameters_g)) => c)
2828
----------------------------- ("predicate-congruence-axiom")
29-
(prove_apr_via(decls, env, assumptions, PR::Predicate(predicate), goal) => c)
29+
(prove_pr_via(decls, env, assumptions, PR::Predicate(predicate), goal) => c)
3030
)
3131

3232
(
@@ -35,22 +35,22 @@ judgment_fn! {
3535
(if skel_c == skel_g)
3636
(if parameters_c == parameters_g) // for relations, we require 100% match
3737
----------------------------- ("relation-axiom")
38-
(prove_apr_via(_decls, env, _assumptions, PR::Relation(relation), goal) => Constraints::none(env))
38+
(prove_pr_via(_decls, env, _assumptions, PR::Relation(relation), goal) => Constraints::none(env))
3939
)
4040

4141
(
4242
(let (env, subst) = env.existential_substitution(&binder))
4343
(let via1 = binder.instantiate_with(&subst).unwrap())
44-
(prove_apr_via(decls, env, assumptions, via1, goal) => c)
44+
(prove_pr_via(decls, env, assumptions, via1, goal) => c)
4545
----------------------------- ("forall")
46-
(prove_apr_via(decls, env, assumptions, WcData::ForAll(binder), goal) => c.pop_subst(&subst))
46+
(prove_pr_via(decls, env, assumptions, WcData::ForAll(binder), goal) => c.pop_subst(&subst))
4747
)
4848

4949
(
50-
(prove_apr_via(&decls, env, &assumptions, wc_consequence, goal) => c)
50+
(prove_pr_via(&decls, env, &assumptions, wc_consequence, goal) => c)
5151
(prove_after(&decls, c, &assumptions, &wc_condition) => c)
5252
----------------------------- ("implies")
53-
(prove_apr_via(decls, env, assumptions, WcData::Implies(wc_condition, wc_consequence), goal) => c)
53+
(prove_pr_via(decls, env, assumptions, WcData::Implies(wc_condition, wc_consequence), goal) => c)
5454
)
5555
}
5656
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use formality_types::{
55

66
use crate::{
77
decls::Decls,
8-
prove::{env::Env, prove_apr::prove_apr},
8+
prove::{env::Env, prove_pr::prove_pr},
99
};
1010

1111
use super::constraints::Constraints;
@@ -20,9 +20,9 @@ judgment_fn! {
2020
debug(goal, assumptions, env, decls)
2121

2222
(
23-
(prove_apr(decls, env, assumptions, a) => c)
23+
(prove_pr(decls, env, assumptions, a) => c)
2424
--- ("atomic")
25-
(prove_wc(decls, env, assumptions, WcData::Atomic(a)) => c)
25+
(prove_wc(decls, env, assumptions, WcData::PR(a)) => c)
2626
)
2727

2828
(

crates/formality-types/src/grammar/wc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl Wc {
119119
#[term]
120120
pub enum WcData {
121121
#[cast]
122-
Atomic(PR),
122+
PR(PR),
123123

124124
#[grammar(for $v0)]
125125
ForAll(Binder<Wc>),

0 commit comments

Comments
 (0)