在语言环境(组)内使用规则 Isabelle
Using the rules inside a locale (group) Isabelle
假设我有以下定理:
comm_group ⦇carrier = e_aff, mult = add, one = (1, 0)⦈
我想证明:
add (add (x1,y1) (x2,y2)) (i (x2,y2)) = (x1,y1)
其中i
是组的逆运算。这 obviously
持有一组。我怎样才能从假设中提取这些知识?
comm_group …
是语言环境谓词,即表明您实际上拥有语言环境实例的东西。要实际使用它,通常 解释 语言环境:
interpret comm_group "⦇carrier = e_aff, mult = add, one = (1, 0)⦈"
by (fact <insert your theorem here>)
在此之后,您可以使用在 comm_group
语言环境中证明的所有定理(例如 m_assoc
)。您可以选择为这些名称添加前缀(如果存在名称冲突特别有用,尤其是当您对同一语言环境有多种解释时):
interpret G: comm_group "⦇carrier = e_aff, mult = add, one = (1, 0)⦈"
by (fact <insert your theorem here>)
那么这个定理就叫做G.m_assoc
。 locale tutorial.
的第 5 节对此进行了介绍
顺便说一句,您可能需要考虑为您的组引入一个缩写,例如
define G where "G = ⦇carrier = e_aff, mult = add, one = (1, 0)⦈"
让写下关于它的陈述不那么麻烦。您还可以通过
使伊莎贝尔的简化器自动展开该定义
define G where [simp]: "G = ⦇carrier = e_aff, mult = add, one = (1, 0)⦈"
假设我有以下定理:
comm_group ⦇carrier = e_aff, mult = add, one = (1, 0)⦈
我想证明:
add (add (x1,y1) (x2,y2)) (i (x2,y2)) = (x1,y1)
其中i
是组的逆运算。这 obviously
持有一组。我怎样才能从假设中提取这些知识?
comm_group …
是语言环境谓词,即表明您实际上拥有语言环境实例的东西。要实际使用它,通常 解释 语言环境:
interpret comm_group "⦇carrier = e_aff, mult = add, one = (1, 0)⦈"
by (fact <insert your theorem here>)
在此之后,您可以使用在 comm_group
语言环境中证明的所有定理(例如 m_assoc
)。您可以选择为这些名称添加前缀(如果存在名称冲突特别有用,尤其是当您对同一语言环境有多种解释时):
interpret G: comm_group "⦇carrier = e_aff, mult = add, one = (1, 0)⦈"
by (fact <insert your theorem here>)
那么这个定理就叫做G.m_assoc
。 locale tutorial.
顺便说一句,您可能需要考虑为您的组引入一个缩写,例如
define G where "G = ⦇carrier = e_aff, mult = add, one = (1, 0)⦈"
让写下关于它的陈述不那么麻烦。您还可以通过
使伊莎贝尔的简化器自动展开该定义define G where [simp]: "G = ⦇carrier = e_aff, mult = add, one = (1, 0)⦈"