Skip to content

Commit 0a933a4

Browse files
committed
update
1 parent 6d1e86b commit 0a933a4

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

Loda/Gadget.lean

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -301,18 +301,21 @@ lemma let_binding_identity
301301
unfold Env.lookupTy
302302
simp_all
303303

304-
lemma field_refintype_implies_exists_field_value (σ: Env.ValEnv) (Δ: Env.CircuitEnv) (Γ: Env.TyEnv) (x: String) (e: Predicate)
305-
: (Env.lookupTy Γ x = Ty.field.refin e) → PropSemantics.tyenvToProp σ Δ Γ → ∃ (a: F), Env.lookupVal σ x = Ast.Value.vF a := by
306-
intro hx hy
307-
have hv := Ty.tyenvToProp_implies_varToProp σ Δ Γ x Ast.Ty.field e hx hy
308-
unfold PropSemantics.varToProp at hv
304+
lemma field_refintype_implies_exists_field_value' (σ: Env.ValEnv) (Δ: Env.CircuitEnv) (Γ: Env.TyEnv) (x: String) (e: Predicate)
305+
: (Env.lookupTy Γ x = Ty.field.refin e) → PropSemantics.varToProp σ Δ Γ x → ∃ (a: F), Env.lookupVal σ x = Ast.Value.vF a := by
306+
intro hx
307+
unfold PropSemantics.varToProp
309308
simp_all
310309
set val := Env.lookupVal σ x
311310
cases val with
312311
| vF n => simp_all
313-
| _ => {
314-
sorry
315-
}
312+
| _ => intro hσ; simp_all
313+
314+
lemma field_refintype_implies_exists_field_value (σ: Env.ValEnv) (Δ: Env.CircuitEnv) (Γ: Env.TyEnv) (x: String) (e: Predicate)
315+
: (Env.lookupTy Γ x = Ty.field.refin e) → PropSemantics.tyenvToProp σ Δ Γ → ∃ (a: F), Env.lookupVal σ x = Ast.Value.vF a := by
316+
intro hx hy
317+
have hv := Ty.tyenvToProp_implies_varToProp σ Δ Γ x Ast.Ty.field e hx hy
318+
exact field_refintype_implies_exists_field_value' σ Δ Γ x e hx hv
316319

317320
lemma eval_eq_vals (v₁ v₂: Ast.Value)
318321
: Eval.evalRelOp RelOp.eq v₁ v₂ = some true → v₁ = v₂ := by

0 commit comments

Comments
 (0)