-- Generated by the EML-lang Lean backend -- Source module: rc_filter -- Source file: /home/monogate/monogate/forge/examples/rc_filter.eml -- Verified fns: tau, vout_steady, vout_initial, vout_charging, vout_charging_at_zero import MachLib.EML import MachLib.Trig import MachLib.Forge import MachLib.Linarith import MachLib.FixedPoint import MachLib.SignTactic open MachLib open MachLib.Real axiom circuit : Real -- helper (axiomatised in MachLib/Discovered) -- ── tau ── noncomputable def tau (r : Real) (c : Real) : Real := (r * c) theorem rc_time_constant_def (r : Real) (c : Real) (h1 : (r > (0 : Real))) (h2 : (c > (0 : Real))) : ((tau r c) = (r * c)) := by unfold tau first | (apply lo_le_clamp <;> (first | assumption | mach_positivity)) | apply clamp_le_hi | mach_positivity | mach_sign | rfl | sorry -- out of reach; left for the prover -- ── vout_steady ── noncomputable def vout_steady (vin : Real) : Real := vin theorem rc_steady_state_equals_input (vin : Real) : ((vout_steady vin) = vin) := by unfold vout_steady first | (apply lo_le_clamp <;> (first | assumption | mach_positivity)) | apply clamp_le_hi | mach_positivity | mach_sign | rfl | sorry -- out of reach; left for the prover -- ── vout_initial ── noncomputable def vout_initial : Real := (0 : Real) theorem rc_initial_output_zero : ((vout_initial ) = (0 : Real)) := by unfold vout_initial first | (apply lo_le_clamp <;> (first | assumption | mach_positivity)) | apply clamp_le_hi | mach_positivity | mach_sign | rfl | sorry -- out of reach; left for the prover -- ── vout_charging ── noncomputable def vout_charging (vin : Real) (t : Real) (tau_val : Real) : Real := (vin * ((1 : Real) - (Real.exp ((-t) / tau_val)))) theorem rc_step_response_form (vin : Real) (t : Real) (tau_val : Real) (h1 : (tau_val > (0 : Real))) : ((vout_charging vin t tau_val) = (vin * ((1 : Real) - (Real.exp ((-t) / tau_val))))) := by unfold vout_charging first | (apply lo_le_clamp <;> (first | assumption | mach_positivity)) | apply clamp_le_hi | mach_positivity | mach_sign | rfl | sorry -- out of reach; left for the prover -- ── vout_charging_at_zero ── noncomputable def vout_charging_at_zero (vin : Real) (tau_val : Real) : Real := (vin * ((1 : Real) - (Real.exp ((0 : Real) / tau_val)))) theorem rc_step_response_at_zero (vin : Real) (tau_val : Real) (h1 : (tau_val > (0 : Real))) : ((vout_charging_at_zero vin tau_val) = (0 : Real)) := by unfold vout_charging_at_zero first | (apply lo_le_clamp <;> (first | assumption | mach_positivity)) | apply clamp_le_hi | mach_positivity | mach_sign | rfl | sorry -- out of reach; left for the prover