Rule for correction of temperature – can´t solve the problem without help

Hi,
i want to correct the value of a sensor (Sonoff-Tasmota, AM2301) by a rule.

in my items:

Number KG_TH10_2_Temperatur		"Außentemperatur [%.1f °C]" 			<temperature>
Number AT_korr					"Außentemperatur korr [%.1f °C]" 		<temperature>	

in my sitemap

Text item=KG_TH10_2_Temperatur
Text item=AT_korr

and the rule:

//Rule zur Korrektur der Temperatursensoren 07.01.2018

import org.eclipse.smarthome.core.items
import org.eclipse.smarthome.core.persistence
import org.eclipse.smarthome.core.library.types
import org.eclipse.smarthome.core.library.items
import org.eclipse.smarthome.model.script.actions

Rule "Temperaturkorrektur KG_TH10_2_Temperatur Sonoff-Sensoren"
when
	Item KG_TH10_2_Temperatur changed
then
// korrigiere um -2 Grad
	Var_AT = KG_TH10_2_Temperatur.state as DezimalType
	var Number Var_AT_korr = Var_AT - 2
	AT_korr.postUpdate(Var_AT_korr)
end

but it does´nt work:

2018-01-21 13:08:40.132 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'tempsensor.rules'

2018-01-21 13:08:40.160 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'tempsensor.rules' is either empty or cannot be parsed correctly!

2018-01-21 13:08:40.426 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'tempsensor.rules' has errors, therefore ignoring it: [7,8]: no viable alternative at input 'Rule'

[16,2]: missing EOF at 'AT_korr'

what is the mistake?

Thanks anybody for help!

What happens if you write it less complicated:

Rule "Temperaturkorrektur KG_TH10_2_Temperatur Sonoff-Sensoren"
when
	Item KG_TH10_2_Temperatur changed
then
	// korrigiere um -2 Grad
	AT_korr.postUpdate( KG_TH10_2_Temperatur.state - 2)
end

So I changed it, and the word “Rule” meanwhile in small letters, Nikolas pointed me out…

2018-01-21 13:46:35.280 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'tempsensor.rules' has errors, therefore ignoring it: [7,8]: no viable alternative at input 'Rule'

the rule just looked like yours and it got more and more complicated because it did not work

rule is written in small letters…

oh no, how stupid. Much better. Thanks!
But now the Raspi can not subtract:

2018-01-21 13:58:59.070 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Temperaturkorrektur KG_TH10_2_Temperatur Sonoff-Sensoren': Unknown variable or command '-'; line 14, column 23, length 30

problem solved, step by step, thanks for the help!

rule "Temperaturkorrektur KG_TH10_2_Temperatur Sonoff-Sensoren"
when
	Item KG_TH10_2_Temperatur changed
then
	// korrigiere um -2 Grad
	AT_korr.postUpdate( KG_TH10_2_Temperatur.state as Number - 2 )
end