You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the fix of #1414. Unfortunately I totally need three nominal types and the 2nd and 3d both have no GVAR constructors. In this case, the call of new_type_step1 still fails. The following code is a modified version of your newly added selftest.sml:
open HolKernel Parse boolLib
open pred_setTheory generic_termsTheory binderLib nomsetTheory nomdatatype
open testutils
val tyname0 = "name";
val tyname1 = "pi";
val tyname2 = "residual";
val gvar_rep_t = “:unit”;
val u_tm = mk_var("u", gvar_rep_t);
val vp = “(\n ^u_tm. n = 0)”;
val glam_rep_t = “:unit + unit”;
val d_tm = mk_var("d", glam_rep_t);
val lp =
“(\n ^d_tm tns uns.
n = 1 /\ ISL d /\ tns = [] ∧ uns = [] \/
n = 1 /\ ISR d /\ tns = [1] ∧ uns = [0] \/
n = 2 /\ ISL d /\ tns = [] ∧ uns = [0]
)”;
val _ = tprint "Deriving type 0"
val _ = require (check_result (K true))
(new_type_step1 tyname0 0)
{vp = vp, lp = lp}
val _ = tprint "Deriving type 1"
val _ = require (check_result (K true))
(new_type_step1 tyname1 1)
{vp = vp, lp = lp}
val _ = tprint "Deriving type 2"
val _ = require (check_result (K true))
(new_type_step1 tyname2 2)
{vp = vp, lp = lp}
However, if the 3rd type do not use the previous two types, e.g. n = 2 /\ ISL d /\ tns = [] ∧ uns = [], then the function call of new_type_step1 will succeed.
--Chun
The text was updated successfully, but these errors were encountered:
The issue is that the third type doesn't have a base-case at all in some sense. I think the way to handle this is enrich the new_type_step1 API so that you can optionally provide theorems asserting that the previous types are inhabited. Then, the proof that the code attempts can appeal to those theorems if necessary.
binghe
added a commit
to binghe/HOL
that referenced
this issue
Mar 7, 2025
Thanks for the fix of #1414. Unfortunately I totally need three nominal types and the 2nd and 3d both have no
GVAR
constructors. In this case, the call ofnew_type_step1
still fails. The following code is a modified version of your newly addedselftest.sml
:However, if the 3rd type do not use the previous two types, e.g.
n = 2 /\ ISL d /\ tns = [] ∧ uns = []
, then the function call ofnew_type_step1
will succeed.--Chun
The text was updated successfully, but these errors were encountered: