From: Jan van Brügge <jan@vanbruegge.de>
Hi,
I am proving some theorem in ML, basically 'P rhs'. This proof is working as expected.
However if I use Local_Theory.define
on rhs
and try to proof the goal with that, I get an extra sort hypothesis error.
I don't understand where that is coming from. The goal has neither free variables in rhs nor forall bound variables. Could someone help me there?
Thanks
Jan
From: Peter Lammich <lammich@in.tum.de>
Hi
You get this error if you have a type class that has no instantiation yet.
Does your locale use such a type class?
Peter
From: Jan van Brügge <jan@vanbruegge.de>
Yes, I generate a class just before the goal that is supposed to be instatiated by the user.
(and that triggers the sort hyposesis error). But the goal should not mention that class. How can I prevent it from doing so?
Cheers,
Jan
From: Jan van Brügge <jan@vanbruegge.de>
To make it concrete, the goal (with the definition looks like this):
Const ("HOL.Trueprop", "bool ⇒ prop") $
(Const ("Prelim.infinite_regular_card_order", "(((nat suc + nat suc) × nat suc) × (nat suc + nat suc) × nat suc) set ⇒ bool") $
Const ("Composition.foo_sum.sum.Sum_Type.bd_foo_sum",
"(((nat suc + nat suc) × nat suc) ×
(nat suc + nat suc) × nat suc) set"))
The RHS of the definition is this:
Const ("BNF_Cardinal_Arithmetic.cprod",
"((nat suc + nat suc) × (nat suc + nat suc)) set
⇒ (nat suc × nat suc) set ⇒ (((nat suc + nat suc) × nat suc) × (nat suc + nat suc) × nat suc) set") $
(Const ("BNF_Cardinal_Arithmetic.csum",
"(nat suc × nat suc) set ⇒ (nat suc × nat suc) set ⇒ ((nat suc + nat suc) × (nat suc + nat suc)) set") $
(Const ("Prelim.card_suc", "(nat × nat) set ⇒ (nat suc × nat suc) set") $ Const ("BNF_Cardinal_Order_Relation.natLeq", "(nat × nat) set")) $
(Const ("Prelim.card_suc", "(nat × nat) set ⇒ (nat suc × nat suc) set") $
Const ("BNF_Cardinal_Order_Relation.natLeq", "(nat × nat) set"))) $
(Const ("Prelim.card_suc", "(nat × nat) set ⇒ (nat suc × nat suc) set") $
Const ("BNF_Cardinal_Order_Relation.natLeq", "(nat × nat) set")))
And somehow trying to prove the goal with the definition causes this
extra sort hyposesis: [["Composition.var_sumID"]], which is a class that
I generate in the same bunch of ML code.
But neither the goal nor the RHS has any variables at all, so I have no
idea why this sort hypothesis is added. Also without the definition it
works just fine, no sort hypothesis is added to the goal.
Thanks,
Jan
Last updated: Jan 04 2025 at 20:18 UTC