/-
Copyright (c) 2026 Robin Carlier. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robin Carlier
-/
module
public import Mathlib.Data.Nat.Basic
public import Mathlib.Tactic.DSimpPercent
/-!
Tests for the behavior of `dsimp%`.
-/
def f : ℕ → ℕ → ℕ := fun a b => a + b
@[simp]
lemma f_apply (a b : ℕ) : f a b = a + b := rfl
-- Testing dsimp% on a proof
variable {a b c : ℕ} in
/-- info: id (Nat.add_comm (f a b) c) : a + b + c = c + (a + b) -/
#guard_msgs in
#check dsimp% Nat.add_comm (f a b) c
-- Testing dsimp% on a term
variable {a b c : ℕ} in
/-- info: a + b : ℕ -/
#guard_msgs in
#check dsimp% f a b
def g : ℕ → ℕ → ℕ := fun a b => a + b
lemma g_apply (a b : ℕ) : g a b = a + b := rfl
-- Testing dsimp% […] on a proof
variable {a b c : ℕ} in
/-- info: id (Nat.add_comm (g a b) c) : a + b + c = c + (a + b) -/
#guard_msgs in
#check dsimp% [g_apply] Nat.add_comm (g a b) c
-- Testing dsimp% […] on a term
variable {a b c : ℕ} in
/-- info: a + b : ℕ -/
#guard_msgs in
#check dsimp% [g_apply] g a b
variable (a b : Int) in
/-- error: `dsimp%` made no progress -/
#guard_msgs in
#check dsimp% a + b
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.0Bemerkung:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-11-24)
¤
*Bot Zugriff