I cut and pasted your code into Xilinx ISE (I know it isn't Quartus...), and can report that it too uses zero logic resources in the fabric there too.
So I drilled down in the FPGA Editor, and you can see in the attached image that the signal is being inverted in the input buffer.
I don't think you have a problem at all.
Also, one thing that you won't come across until it is too late is that you don't have set the range for STD_LOGIC_VECTOR explicitly all the time. That way you won't need a NOT1, NOT2, NOT3 and so on.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity not_n is
port(
a : in std_logic_vector;
y : out std_logic_vector
);
end not_n;
architecture behavior of not_n is
begin
y(0) <= not a(0);
end behavior;
And here it is used in the top module:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity not1_top is
port(
SW : in std_logic_vector(0 downto 0);
LEDR : out std_logic_vector(0 downto 0)
);
end not1_top;
architecture behavior of not1_top is
component not_n is
port(
a : in std_logic_vector;
y : out std_logic_vector
);
end component;
begin
i_not_n : not_n port map(
a => SW,
y => LEDR
);
end behavior;