Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  ComputableShortcuts.lean   Sprache: Lean

 

/-
This test must import everything to make the noncomputable instances which we don't want available.
-/

import Mathlib

/-!
# Tests that basic algebraic typeclasses are computable

Frequently mathlib will have instances of the form
```
instance : FooAndBar X := ...

-- in a later file
noncomputable instance : VeryNoncomputableFoo X := ...
```
which means that `Foo X` will sometimes be synthesized noncomputably even though a computable
version is available.

TODO: test this more exhaustively.
-/


macro "#guard_computable" t:term : command =>
  `(#guard_msgs (drop info) in #eval $t)

section Real

#guard_computable LinearMap.mul ℝ ℝ 2 3
#guard_computable LinearEquiv.neg ℝ (2 : ℝ)

end Real

section Complex

#guard_computable LinearMap.mul ℂ ℂ 2 3
#guard_computable LinearEquiv.neg ℂ (2 : ℂ)

end Complex

Messung
CHZG
100100100100

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,077
#Domains=862,090