人工智能数学验证工具LEAN4【入门介绍8】小于等于世界-证明<=是自然数的一个全序

该篇文章介绍了使用LEAN4这个人工智能数学验证工具来证明自然数全序性质,通过实例演示了如何证明如果x≤2,则x=0或1或2。后续内容将探讨全序与乘法之间的理论联系,适合对AdvancedMultiplicationWorld感兴趣的学习者。
摘要由CSDN通过智能技术生成

视频链接:人工智能数学验证工具LEAN4【入门介绍8】小于等于世界-证明<=是自然数的一个全序_哔哩哔哩_bilibili

import Game.Levels.LessOrEqual.L10le_one
World "LessOrEqual"
Level 11
Title "le_two"

namespace MyNat

TheoremTab "012"

/-- `le_two x` is a proof that if `x ≤ 2` then `x = 0` or `x = 1` or `x = 2`. -/
TheoremDoc MyNat.le_two as "le_two" in "≤"

Introduction "
We'll need this lemma to prove that two is prime!

You'll need to know that `∨` is right associative. This means that
`x = 0 ∨ x = 1 ∨ x = 2` actually means `x = 0 ∨ (x = 1 ∨ x = 2)`.
This affects how `left` and `right` work.
"

/-- If $x \leq 2$ then $x = 0$ or $1$ or $2$. -/
Statement le_two (x : ℕ) (hx : x ≤ 2) : x = 0 ∨ x = 1 ∨ x = 2 := by
  cases x with y
  left
  rfl
  cases y with z
  right
  left
  rw [one_eq_succ_zero]
  rfl
  rw [two_eq_succ_one, one_eq_succ_zero] at hx ⊢
  apply succ_le_succ at hx
  apply succ_le_succ at hx
  apply le_zero at hx
  rw [hx]
  right
  right
  rfl


Conclusion "
Nice!

The next step in the development of order theory is to develop
the theory of the interplay between `≤` and multiplication.
If you've already done Multiplication World, you're now ready for
Advanced Multiplication World. Click on \"Leave World\" to access it.
"

  • 8
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这是一个XML文件的一部分,属于IntelliJ IDEA的配置文件之一,可能是用于配置文件编辑器的行为。这个XML元素的名称是`component`,它有一个`name`属性,值为`FileEditorManager`。在这个元素中,有一个`leaf`子元素,具有一个`SIDE_TABS_SIZE_LIMIT_KEY`属性,表示文件编辑器的侧边栏选项卡的大小限制。`leaf`元素表示一个文件编辑器的标签页,具有一个`file`子元素和一个`entry`子元素。`file`元素表示文件编辑器的文件,具有一个`leaf-file-name`属性,表示文件的名称,以及`pinned`和`current-in-tab`属性,分别表示文件是否被钉住和文件是否在标签页中。`entry`元素表示文件编辑器的输入项,具有一个`file`属性,表示文件的URL。在`entry`元素中,有一个`provider`子元素,表示文件编辑器的提供者,具有一个`selected`和`editor-type-id`属性,分别表示提供者是否被选中和提供者的编辑器类型。在`provider`元素中,有一个`state`子元素,表示文件编辑器的状态,具有一个`relative-caret-position`属性,表示光标的相对位置。在`state`元素中,有一个`caret`子元素,表示光标的位置和选择区域,具有`line`、`column`、`lean-forward`、`selection-start-line`、`selection-start-column`、`selection-end-line`和`selection-end-column`属性。在`state`元素中,还有一个`folding`子元素,表示文件编辑器的折叠状态。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值