当前位置: 首页 > news >正文

人工智能数学验证工具LEAN4【入门介绍3】乘法世界-证明乘法的所有运算律

视频链接,创作不易记得投币哦:

import Game.Levels.Multiplication.L08add_mul


World "Multiplication"
Level 9
Title "mul_assoc"

namespace MyNat

Introduction
"
We now have enough to prove that multiplication is associative,
the boss level of multiplication world. Good luck!
"

LemmaDoc MyNat.mul_assoc as "mul_assoc" in "*" "
`mul_assoc a b c` is a proof that `(a * b) * c = a * (b * c)`.

Note that when Lean says `a * b * c` it means `(a * b) * c`.

Note that `(a * b) * c = a * (b * c)` cannot be proved by \"pure thought\":
for example subtraction is not associative, as `(6 - 2) - 1` is not
equal to `6 - (2 - 1)`.
"

/-- Multiplication is associative.
In other words, for all natural numbers $a$, $b$ and $c$, we have
$(ab)c = a(bc)$. -/
Statement mul_assoc
    (a b c : ℕ) : (a * b) * c = a * (b * c)  := by
  induction c with d hd
  · rw [mul_zero, mul_zero, mul_zero]
    rfl
  · rw [mul_succ]
    rw [mul_succ]
    rw [hd]
    rw [mul_add]
    rfl

LemmaTab "*"

Conclusion "
A passing mathematician notes that you've proved
that the natural numbers are a commutative semiring.

If you want to begin your journey to the final boss, head for Power World.
"

http://www.lryc.cn/news/285315.html

相关文章:

  • Armv8-M的TrustZone技术简介
  • ctfshow-反序列化(web267-web270)
  • 决策树的分类
  • LateX--插入伪代码类型详解
  • 《Python数据分析技术栈》第06章使用 Pandas 准备数据 04 DataFrames
  • wayland(xdg_wm_base) + egl + opengles 最简实例
  • MySQL部署
  • 【ARM 嵌入式 编译系列 3.7 -- newlib 库文件与存根函数 stubs 详细介绍】
  • 【C++】结构体
  • web架构师编辑器内容-拖动元素改变元素的位置和大小的完成
  • 基于CNN的水果识别-含数据集训练模型
  • Hadoop基本概论
  • 2023年12月 Scratch 图形化(一级)真题解析#中国电子学会#全国青少年软件编程等级考试
  • burp靶场--访问控制【越权】
  • C#使用DateTime.Now静态属性动态获得系统当前日期和时间
  • 华为机考入门python3--(0)模拟题2-vowel元音字母翻译
  • 【轮式平衡机器人】——角度/速度/方向控制分析软件控制框架
  • HYBBS 表白墙网站PHP程序源码 可封装成APP
  • 【设计模式】适配器和桥接器模式有什么区别?
  • C语言应用层程序热补丁
  • 【代码随想录+力扣hot100】双指针
  • 【Java程序员面试专栏 专业技能篇】MySQL核心面试指引(三):性能优化策略
  • qnx 上screen + egl + opengles 最简实例
  • python基础学习-02
  • 服务调用Ribbon,LoadBalance,Feign
  • 一条sql是如何运行的
  • SystemC学习笔记(三) - 查看模块的波形
  • 计算机网络(第六版)复习提纲5
  • JavaScript 学习笔记(WEB APIs Day3)
  • Springboot自动装配:三个注解、Selector、spring.factories文件、@ConditionalOnProperty注解