MCPcopy Create free account
hub / github.com/argumentcomputer/ix / bad_non_prop_eq

Function bad_non_prop_eq

crates/kernel/src/tutorial/defeq.rs:251–279  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249 /// ∀ (α : Type) (a b : α), Eq a b
250 #[test]
251 fn bad_non_prop_eq() {
252 let mut env = KEnv::<Meta>::new();
253 add_eq_axioms(&mut env);
254
255 // ∀ (α : Type) (a b : α), Eq.{1} α a b
256 // depth 3: α=var(2), a=var(1), b=var(0)
257 let ty = npi(
258 "α",
259 sort1(),
260 npi(
261 "a",
262 var(0),
263 npi("b", var(1), eq_expr(usucc(uzero()), var(2), var(1), var(0))),
264 ),
265 );
266 // fun α a b => Eq.refl.{1} α a (claims Eq a a, but type says Eq a b — no proof irrel for Type)
267 let val = nlam(
268 "α",
269 sort1(),
270 nlam(
271 "a",
272 var(0),
273 nlam("b", var(1), eq_refl_expr(usucc(uzero()), var(2), var(1))),
274 ),
275 );
276 let (id, c) = mk_thm("badNonPropEq", 0, vec![], ty, val);
277 env.insert(id.clone(), c);
278 check_rejects(&mut env, &id);
279 }
280
281 // ==========================================================================
282 // Batch 12: Unit eta (Tutorial.lean 958–965)

Callers

nothing calls this directly

Calls 13

add_eq_axiomsFunction · 0.85
npiFunction · 0.85
eq_exprFunction · 0.85
usuccFunction · 0.85
uzeroFunction · 0.85
nlamFunction · 0.85
eq_refl_exprFunction · 0.85
mk_thmFunction · 0.85
check_rejectsFunction · 0.85
sort1Function · 0.50
varFunction · 0.50
insertMethod · 0.45

Tested by

no test coverage detected