AFTD Auto-Formalizing Theoretical Domains

Cslib.LambdaCalculus.LocallyNameless.Context.mapVal

defimported Lean

A mapping of values within a context.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Cslib Cslib.LambdaCalculus Cslib.LambdaCalculus.LocallyNameless in
universe u v in
variable {α : Type u} {β : Type v} in
variable [DecidableEq α] in
open List in
attribute [local grind =] Option.mem_def in
attribute [local grind _=_] List.append_eq in
attribute [local grind =] List.Nodup in
attribute [local grind _=_] List.singleton_append in
attribute [local grind =] Option.or_eq_some_iff in
attribute [local grind =] Option.or_eq_none_iff in
attribute [local grind _=_] List.mem_toFinset in
attribute [local grind =] List.nodupKeys_middle in
attribute [local grind →] List.perm_nodupKeys in
variable {Γ Δ : Context α β} in
@[simp, grind]
def Cslib.LambdaCalculus.LocallyNameless.Context.mapVal (f : β → β) (Γ : Context α β) : Context α β
Defined in
CSLib, `Cslib.LambdaCalculus.LocallyNameless.Context.mapVal`
Lean proof
By Chris Henson, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2025 Chris Henson. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.
What was changed in Cslib.LambdaCalculus.LocallyNameless.Context.mapVal
--- Cslib/Languages/LambdaCalculus/LocallyNameless/Context.lean:71 (Cslib.LambdaCalculus.LocallyNameless.Context.mapVal)
+++ as compiled here
@@ -1,4 +1,20 @@
-/-- A mapping of values within a context. -/
-@[simp, scoped grind]
-def mapVal (f : β → β) (Γ : Context α β) : Context α β :=
+set_option autoImplicit true in
+set_option relaxedAutoImplicit true in
+open Cslib Cslib.LambdaCalculus Cslib.LambdaCalculus.LocallyNameless in
+universe u v in
+variable {α : Type u} {β : Type v} in
+variable [DecidableEq α] in
+open List in
+attribute [local grind =] Option.mem_def in
+attribute [local grind _=_] List.append_eq in
+attribute [local grind =] List.Nodup in
+attribute [local grind _=_] List.singleton_append in
+attribute [local grind =] Option.or_eq_some_iff in
+attribute [local grind =] Option.or_eq_none_iff in
+attribute [local grind _=_] List.mem_toFinset in
+attribute [local grind =] List.nodupKeys_middle in
+attribute [local grind →] List.perm_nodupKeys in
+variable {Γ Δ : Context α β} in
+@[simp, grind]
+def Cslib.LambdaCalculus.LocallyNameless.Context.mapVal (f : β → β) (Γ : Context α β) : Context α β :=
   Γ.map (fun ⟨var,ty⟩ => ⟨var,f ty⟩)
Verified
08 Oct 2026
Axioms
none listed
Built on 3
Used by 2

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Cslib Cslib.LambdaCalculus Cslib.LambdaCalculus.LocallyNameless in
universe u v in
variable {α : Type u} {β : Type v} in
variable [DecidableEq α] in
open List in
attribute [local grind =] Option.mem_def in
attribute [local grind _=_] List.append_eq in
attribute [local grind =] List.Nodup in
attribute [local grind _=_] List.singleton_append in
attribute [local grind =] Option.or_eq_some_iff in
attribute [local grind =] Option.or_eq_none_iff in
attribute [local grind _=_] List.mem_toFinset in
attribute [local grind =] List.nodupKeys_middle in
attribute [local grind →] List.perm_nodupKeys in
variable {Γ Δ : Context α β} in
/-- A mapping of values within a context. -/
@[simp, grind]
def Cslib.LambdaCalculus.LocallyNameless.Context.mapVal (f : β → β) (Γ : Context α β) : Context α β :=
  Γ.map (fun ⟨var,ty⟩ => ⟨var,f ty⟩)
See it in the graphDiscuss this resultChallenge it